Commit Graph

76 Commits

Author SHA1 Message Date
Nicolas Bessi 013dc83400
Fix typo in dir name 2018-11-05 17:35:51 +01:00
Guewen Baconnier 06a5dc0fae
Fix iteration on records 2018-11-05 17:35:33 +01:00
Guewen Baconnier 675335a26b
Use SavepointCase instead of TransactionCase
It means less records to create for each test
2018-11-05 17:35:33 +01:00
Guewen Baconnier 95f5e2abaf
Add tests and support of _inherits 2018-11-05 17:35:33 +01:00
Guewen Baconnier bd67585150
fixup! Fixes for review feedbacks 2018-11-05 17:35:32 +01:00
Guewen Baconnier 8325b7ee74
fixup! Infer configparser getter from field type 2018-11-05 17:35:32 +01:00
Guewen Baconnier abbfec896b
fixup! Update documentation of server_environment, bump 2018-11-05 17:35:32 +01:00
Guewen Baconnier ea5204d471
Fixes for review feedbacks 2018-11-05 17:35:32 +01:00
Guewen Baconnier 98bc9ea988
Infer configparser getter from field type 2018-11-05 17:35:32 +01:00
Guewen Baconnier e096c209ed
Add tests for the server env mixin 2018-11-05 17:35:32 +01:00
Guewen Baconnier 80a56d320a
Reinforce server_environment base tests 2018-11-05 17:35:31 +01:00
Guewen Baconnier 5b977f8df5
Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG
Allows to isolate the secrets in your deployment
2018-11-05 17:35:31 +01:00
Guewen Baconnier 107ca7da9d
Update documentation of server_environment, bump 2018-11-05 17:35:31 +01:00
Guewen Baconnier 398b324b03
Allow integration with keychain
By adding options to change the compute and inverse methods for default
fields
2018-11-05 17:35:31 +01:00
Guewen Baconnier e8da1f3d25
Make server_environment_files optional 2018-11-05 17:35:31 +01:00
Guewen Baconnier c5f56e6336
Allow to edit all fields on creation 2018-11-05 17:35:31 +01:00
Guewen Baconnier d7f0a1b24b
Use global section name as first part of the section 2018-11-05 17:35:30 +01:00
Guewen Baconnier 27c1a41f24
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-11-05 17:35:30 +01:00
Guewen Baconnier e0832cb649
Add global section 2018-11-05 17:35:30 +01:00
Guewen Baconnier 572f581bfa
Use a dictionary to configure the fields 2018-11-05 17:35:30 +01:00
Guewen Baconnier 70d6966ce0
Fix a few small issues in mixin 2018-11-05 17:35:30 +01:00
Guewen Baconnier f7e207a1a1
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-11-05 17:35:29 +01:00
Guewen Baconnier d917407672
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-11-05 17:35:29 +01:00
Guewen Baconnier fbc4f8f928
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-11-05 17:35:29 +01:00
Guewen Baconnier 471514ca4f
Improve documentation regarding variables 2018-11-05 17:35:29 +01:00
Guewen Baconnier d52e93a743
Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG
Allows to isolate the secrets in your deployment
2018-11-05 17:35:29 +01:00
Guewen Baconnier ec14e3da0a
Add SERVER_ENV_CONFIG to configure vars from env. variable 2018-11-05 17:35:29 +01:00
Stéphane Bidoul (ACSONE) 494ca7b63c
remove obsolete .pot files [ci skip] 2018-11-05 17:35:28 +01:00
Thomas Binsfeld 0edbbf9223
[REF] Server Environment: remove dependency on server_environement_files
From https://github.com/OCA/server-env/issues/10
2018-11-05 17:35:28 +01:00
Stéphane Bidoul (ACSONE) 4444e73998
server_environment: bump version
To trigger rebuild following change in setup.py
2018-11-05 17:35:28 +01:00
OCA Transbot 6a362522e5
OCA Transbot updated translations from Transifex 2018-11-05 17:35:28 +01:00
Thierry Ducrest cd0a2b2186
[FIX] bug on view by changing generated table field name 2018-11-05 17:35:28 +01:00
Thierry Ducrest 1cb4b8d418
Remove file encoding directive 2018-11-05 17:35:28 +01:00
Guewen Baconnier bce8bbfb6e
Remove encoding declaration from XML view
It's no longer supported in lxml:

      File "/opt/odoo/external-src/server-tools/server_environment/serv_config.py", line 228, in _build_osv
        cls._arch = etree.fromstring(arch)
      File "src/lxml/lxml.etree.pyx", line 3213, in lxml.etree.fromstring (src/lxml/lxml.etree.c:82934)
      File "src/lxml/parser.pxi", line 1814, in lxml.etree._parseMemoryDocument (src/lxml/lxml.etree.c:124471)
    ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
2018-11-05 17:35:27 +01:00
Thierry Ducrest d446152585
[MIG] server_environment: Migration to 11.0 2018-11-05 17:35:27 +01:00
Adrien Peiffer (ACSONE) 6f908a8566
[IMP] Review 2018-11-05 17:35:27 +01:00
Adrien Peiffer (ACSONE) 6dabf0aa36
[FIX] Flake8 2018-11-05 17:35:27 +01:00
Adrien Peiffer (ACSONE) a21b319ad7
Migration of server_environment to 10.0 2018-11-05 17:35:27 +01:00
Pedro M. Baeza 87116057bb
[MIG] Rename manifest files 2018-11-05 17:35:27 +01:00
Pedro M. Baeza 1b69828ca8
[MIG] Make modules uninstallable 2018-11-05 17:35:26 +01:00
Stéphane Bidoul (ACSONE) 17c815287e
[IMP] load server environment options from odoo rcfile too (#556)
* [IMP] load server environment options from odoo rcfile

This allows delivering the code with default configuration options for
all environments in the server_environment_file module, but letting
the administrator override some configuration entries in the regular
odoo configuration file.

* server_environment_file: update README
2018-11-05 17:35:26 +01:00
Alexandre Fayolle cf94930a96
9.0 migration of server_environment 2018-11-05 17:35:26 +01:00
Pedro M. Baeza e239779127
[MIG] Make modules uninstallable 2018-11-05 17:35:26 +01:00
Stéphane Bidoul db1d527deb
[UPD] prefix versions with 8.0 2018-11-05 17:35:26 +01:00
Leonardo Pistone 685050b212
remove deprecated checks list 2018-11-05 17:35:26 +01:00
Holger Brunn b82a500769
[FIX] unconfigured server_environment doesn't play
nice with static files
2018-11-05 17:35:25 +01:00
Yannick Vaucher 187fe81154
Add missing default oca icons 2018-11-05 17:35:25 +01:00
Alexandre Fayolle 02691c4b16
Add OCA as author of OCA addons
In order to get visibility on https://www.odoo.com/apps the OCA board has
decided to add the OCA as author of all the addons maintained as part of the
association.
2018-11-05 17:35:25 +01:00
Alexandre Fayolle 23e5102e9e
fix pep8 W503 2018-11-05 17:35:25 +01:00
Yannick Vaucher 608073ac85
Add license key in __openerp__.py 2018-11-05 17:35:25 +01:00