Tools to manage environment-dependent configuration
Go to file
Guewen Baconnier fee58c7681 Add SERVER_ENV_CONFIG to configure vars from env. variable
Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG

Allows to isolate the secrets in your deployment

Improve documentation regarding variables

Add a server environment mixin

To automatically convert fields into fields reading values from the
environment. Until now, every module reimplements the same computed
field.

Read default values from database when no config is provided

Automatically add <field_name>_env_default for every field transformed
to a "computed from env" field, so a default value can be set. It will
be used when the configuration is not set in a configuration file
(when the key is absent, not empty).

Allow to edit default values for env-computed fields

When they don't have any key in the environment configuration files.
In the UI, when a field is set in a configuration file, the field is
readonly, if not the field is editable. Which means you can selectively
choose which fields depend on the environment and which can use a
"default" value stored in database.

Fix a few small issues in mixin

Use a dictionary to configure the fields

Add global section

Disable prefetch on env-computed fields

As in the inverse field that write the value into the <field>_env_default
we have to browse the record, the prefetch has the effect of calling
compute on the env-computed field which resets the value to it's
previous state before we have the occasion to store it.

Use global section name as first part of the section

Allow to edit all fields on creation

Make server_environment_files optional

Allow integration with keychain

By adding options to change the compute and inverse methods for default
fields

Update documentation of server_environment, bump

Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG

Allows to isolate the secrets in your deployment

Reinforce server_environment base tests

Add tests for the server env mixin

Infer configparser getter from field type

Fixes for review feedbacks

Add tests and support of _inherits

Use SavepointCase instead of TransactionCase

It means less records to create for each test

Fix iteration on records
2022-10-04 11:11:51 +02:00
.github/workflows Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
server_environment Add SERVER_ENV_CONFIG to configure vars from env. variable 2022-10-04 11:11:51 +02:00
setup Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.copier-answers.yml Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.editorconfig Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.eslintrc.yml Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.flake8 Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.gitignore Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.isort.cfg Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.pre-commit-config.yaml Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.prettierrc.yml Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.pylintrc Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
.pylintrc-mandatory Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
LICENSE Initialize 16.0 branch 2022-10-03 22:05:41 +02:00
README.md Initialize 16.0 branch 2022-10-03 22:05:41 +02:00

README.md

Runboat Pre-commit Status Build Status codecov Translation Status

server-env

TODO: add repo description.

This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.