Commit Graph

182 Commits

Author SHA1 Message Date
Guewen Baconnier f55e7e0561 fixup! Update documentation of server_environment, bump 2018-07-24 13:43:49 +02:00
Guewen Baconnier c472ca8504 Fixes for review feedbacks 2018-07-24 13:43:03 +02:00
Guewen Baconnier 303e5e637f Infer configparser getter from field type 2018-07-24 13:39:22 +02:00
Guewen Baconnier b2c6a1ce4f fixup! Add tests for the server env mixin 2018-07-24 11:50:06 +02:00
Guewen Baconnier 3dae9eeb7f Add test for custom compute methods 2018-07-24 10:06:05 +02:00
Guewen Baconnier ea30313c43 Add tests for the server env mixin 2018-07-24 10:06:05 +02:00
Guewen Baconnier d3fe970be8 Reinforce server_environment base tests 2018-07-24 10:06:05 +02:00
Guewen Baconnier edbefe2162 Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG
Allows to isolate the secrets in your deployment
2018-07-24 10:06:05 +02:00
Guewen Baconnier c83da6071c Update documentation of server_environment, bump 2018-07-24 10:06:05 +02:00
Guewen Baconnier 9b0bdba495 Allow integration with keychain
By adding options to change the compute and inverse methods for default
fields
2018-07-24 10:06:05 +02:00
Guewen Baconnier d9ad47f40d Make server_environment_files optional 2018-07-24 10:06:05 +02:00
Guewen Baconnier 9371d19fbf Use new server.env.mixin in mail_environment 2018-07-24 10:06:05 +02:00
Guewen Baconnier 9ee47dc5d2 Allow to edit all fields on creation 2018-07-24 09:56:20 +02:00
Guewen Baconnier 9ae51f3c68 Use global section name as first part of the section 2018-07-24 09:56:20 +02:00
Guewen Baconnier 6b44590605 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.
2018-07-24 09:56:20 +02:00
Guewen Baconnier 60375bbf65 Add global section 2018-07-24 09:56:18 +02:00
Guewen Baconnier 64c3e29b73 Use a dictionary to configure the fields 2018-07-24 09:50:06 +02:00
Guewen Baconnier 8d43652dbd Fix a few small issues in mixin 2018-07-24 09:49:27 +02:00
Guewen Baconnier 04bbfce412 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.
2018-07-24 09:31:47 +02:00
Guewen Baconnier ff91cc4a0f 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).
2018-07-24 09:31:47 +02:00
Guewen Baconnier 59fab426e1 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.
2018-07-24 09:31:47 +02:00
Maxime Chambreuil 5cdc84821a
Merge pull request #12 from guewen/add-config-from-env
Add SERVER_ENV_CONFIG to configure vars from env. variable
2018-07-23 08:37:18 -05:00
Guewen Baconnier 9e98c79a31 Improve documentation regarding variables 2018-07-23 12:48:19 +02:00
Guewen Baconnier 3b074b1061 Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG
Allows to isolate the secrets in your deployment
2018-07-23 11:13:26 +02:00
Guewen Baconnier 8a075db418 Add SERVER_ENV_CONFIG to configure vars from env. variable 2018-07-19 09:17:06 +02:00
Stéphane Bidoul (ACSONE) 122da19cd2
trigger Travis build to generate .pot 2018-06-23 18:22:47 +02:00
Stéphane Bidoul (ACSONE) 2e5a563637
remove obsolete .pot files [ci skip] 2018-06-15 23:41:34 +02:00
Pedro M. Baeza 2ca6817e4b
Merge pull request #11 from acsone/11.0-server_environment_remove_dependency_tbi
[11.0] [REF] Server Environment: remove dependency on server_environment_files
2018-06-06 09:26:37 +02:00
Thomas Binsfeld 7cedac6dfb [REF] Server Environment: remove dependency on server_environement_files
From https://github.com/OCA/server-env/issues/10
2018-06-04 16:15:24 +02:00
OCA Git Bot b90a0697b5 [ADD] setup.py [ci skip] 2018-04-19 11:54:03 +02:00
OCA Git Bot 56c9379e4d [UPD] addons table in README.md 2018-03-31 02:40:42 +02:00
Stéphane Bidoul (ACSONE) 9fd1e0296f
server_environment: bump version
To trigger rebuild following change in setup.py
2018-03-30 20:15:59 +02:00
Stéphane Bidoul (ACSONE) 8dfe6c3dca
Merge pull request #9 from acsone/11.0-fix_override_server_env_files_dependcy-bwi
[FIX] server_environment_file does not exist as a packaged addon
2018-03-30 18:32:08 +02:00
Benjamin Willig c2d68cf81d [FIX] server_environment_file does not exist as a packaged addon 2018-02-21 10:17:49 +01:00
OCA Git Bot b0bcc2d699 [ADD] setup.py 2018-01-25 04:36:39 +01:00
OCA Git Bot e2b0b90310 [UPD] addons table in README.md 2018-01-25 02:40:51 +01:00
Guewen Baconnier bc83dd514d
Merge pull request #8 from simahawk/server_environment_ir_config-MIG
[MIG][11.0] server_environment_ir_config_parameter
2018-01-24 14:48:19 +01:00
Thierry Ducrest ed571581c6 [MIG][11.0] server_environment_ir_config_parameter 2018-01-24 12:39:18 +01:00
OCA Git Bot e913559a9e [ADD] setup.py 2018-01-23 04:36:45 +01:00
OCA Git Bot e4cd84dcd6 [UPD] addons table in README.md 2018-01-23 02:41:11 +01:00
Guewen Baconnier 80813dea95
Merge pull request #7 from simahawk/11.0-mig-mail_environment
[11.0][MIG] mail_environment
2018-01-19 10:41:13 +01:00
OCA Transbot f69a9e3894 OCA Transbot updated translations from Transifex 2018-01-16 15:29:53 +01:00
Adrien Peiffer (ACSONE) 3ef843f2ea [FIX] server_environment_ir_config_parameter: missing return. 2018-01-16 15:29:53 +01:00
Stéphane Bidoul (ACSONE) c25933813e [FIX] missing sudo in server_environment_ir_config_param
Without this sudo get_param would fail when the first user reading a parameter that has changed in the configuration file does not have write access to system parameters.
2018-01-16 15:29:53 +01:00
Denis Roussel 0742d816ac [10.0][FIX] server_environment_ir_config_parameter Avoid loading import
Odoo loads modules that contain static directory, so it wanted to load server_environment_files but it does not exist
2018-01-16 15:15:46 +01:00
Stéphane Bidoul (ACSONE) e650ca0c11 server_environment_ir_config_parameter: migrate to 10.0 2018-01-16 15:15:46 +01:00
Stéphane Bidoul (ACSONE) b1b6edf607 server_environment_ir_config_parameter: update roadmap 2018-01-16 15:15:46 +01:00
Stéphane Bidoul (ACSONE) 819b324ec8 server_environment_ir_config_param: silently replace values by config values
This is much more robust that raising an error, and let modules
load ir.config_parameter from xml data files, while still enforcing
values from the config files.
2018-01-16 15:15:46 +01:00
Stéphane Bidoul (ACSONE) 6eb4f39ca7 server_environment_ir_config_parameter: handle empty values better 2018-01-16 15:15:46 +01:00
Stéphane Bidoul (ACSONE) dc993a9ba7 server_environment_ir_config_parameter: work around double ormcache issue 2018-01-16 15:15:46 +01:00