Commit Graph

16 Commits

Author SHA1 Message Date
Pierre Verkest 9996a48cf7 [IMP] server_environmnet: allow to overwrite odoo config options from server_environment_files 2023-12-19 21:56:42 +01:00
Pierre Verkest 4286429cba [IMP] server_environment: allow env variable conf 2023-09-07 12:31:02 +02:00
Ivàn Todorovich be80363ee2 [UPD] Change LICENSE to LGPL 2021-10-22 12:55:46 +02:00
Simone Orsi c5ea873006 fixup! server_environment: running_env default to `test` (fix #44) 2020-10-12 10:40:13 +02:00
Simone Orsi c54bf8c500 server_environment: running_env default to `test` (fix #44) 2020-10-12 10:40:13 +02:00
Akim Juillerat ec7b171368 server_environment: Improve tests.common to allow redefinition of serv_config application 2020-10-12 10:40:13 +02:00
Stéphane Bidoul (ACSONE) 2dd9150dc3 pre-commit, black, isort 2020-10-12 10:40:13 +02:00
Akim Juillerat 6ac8fdfc63 server-environment: Run pre-commit 2020-10-12 10:40:13 +02:00
Akim Juillerat d5ee5a1e28 server_environment: lint fixes after migration 2020-10-12 10:40:13 +02:00
Stéphane Bidoul (ACSONE) 2b78d3e8d3 pre-commit, black, isort 2020-10-12 10:40:13 +02:00
Stéphane Bidoul (ACSONE) bc6d24f6e4 [MIG] server_environment from 11 to 12 2020-10-12 10:40:13 +02:00
Guewen Baconnier 0c50afea22 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
2020-10-12 10:40:13 +02:00
Thierry Ducrest 1d9b0eb063 [MIG] server_environment: Migration to 11.0 2020-10-12 10:40:13 +02:00
Adrien Peiffer (ACSONE) c496bbd386 Migration of server_environment to 10.0 2020-10-12 10:40:13 +02:00
Leonardo Pistone 2f1db3ce7f remove deprecated checks list 2020-10-12 10:40:13 +02:00
Nicolas Bessi d7057f78bd Port server environment to version 8.0 2020-10-12 10:40:13 +02:00