Commit Graph

57 Commits

Author SHA1 Message Date
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) 2e5a563637
remove obsolete .pot files [ci skip] 2018-06-15 23:41:34 +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
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
OCA Transbot f89ccb5cd5 OCA Transbot updated translations from Transifex 2018-01-03 12:00:23 +01:00
Thierry Ducrest 6503590161 [FIX] bug on view by changing generated table field name 2018-01-03 12:00:06 +01:00
Thierry Ducrest 4d15ab249a Remove file encoding directive 2018-01-03 10:43:21 +01:00
Guewen Baconnier 6111db3007 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-01-03 10:43:21 +01:00
Thierry Ducrest d833697a8a [MIG] server_environment: Migration to 11.0 2018-01-03 10:43:21 +01:00
Adrien Peiffer (ACSONE) a020d1f408 [IMP] Review 2018-01-03 10:43:21 +01:00
Adrien Peiffer (ACSONE) 43c07281b9 [FIX] Flake8 2018-01-03 10:43:21 +01:00
Adrien Peiffer (ACSONE) c3d08a9f91 Migration of server_environment to 10.0 2018-01-03 10:43:21 +01:00
Pedro M. Baeza f169fdb1bb [MIG] Rename manifest files 2018-01-03 10:43:21 +01:00
Pedro M. Baeza 08def043c3 [MIG] Make modules uninstallable 2018-01-03 10:43:21 +01:00
Stéphane Bidoul (ACSONE) a238c345eb [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-01-03 10:43:21 +01:00
Alexandre Fayolle 752523554f 9.0 migration of server_environment 2018-01-03 10:43:21 +01:00
Pedro M. Baeza 2e73e40503 [MIG] Make modules uninstallable 2018-01-03 10:43:21 +01:00
Stéphane Bidoul 1937deefdb [UPD] prefix versions with 8.0 2018-01-03 10:43:21 +01:00
Leonardo Pistone b6750de881 remove deprecated checks list 2018-01-03 10:43:21 +01:00
Holger Brunn e5d64b6e75 [FIX] unconfigured server_environment doesn't play
nice with static files
2018-01-03 10:43:21 +01:00
Yannick Vaucher 112f697dc3 Add missing default oca icons 2018-01-03 10:43:21 +01:00
Alexandre Fayolle 32884fdfa4 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-01-03 10:43:21 +01:00
Alexandre Fayolle e17b111a7c fix pep8 W503 2018-01-03 10:43:21 +01:00
Yannick Vaucher 320470701c Add license key in __openerp__.py 2018-01-03 10:43:21 +01:00
Leonardo Pistone a9a5c677b4 capture stderr as well as stdout when diagnosing
This fixes OCA/server-tools#125 because in some Ubuntu systems
lsb_release outputs to stderr as well as stdout. This message will be
printed to console, not logged nor shown among server infomation. That
way the message is lost and only pollutes unit tests output.
2018-01-03 10:43:21 +01:00
Holger Brunn 20f73aa487 [FIX] travis 2018-01-03 10:43:21 +01:00
Daniel Reis ee128f10c0 Fix pylint on server_environment 2018-01-03 10:43:21 +01:00
Nicolas Bessi 14d44bd00e Remove dead commented code 2018-01-03 10:43:20 +01:00
Nicolas Bessi 4d37d8a18f Improve performance by moving _build_osv in init 2018-01-03 10:43:20 +01:00
Nicolas Bessi 4756242925 Add unit test for server environment 2018-01-03 10:43:20 +01:00
Nicolas Bessi 9b9d2f3163 Refactor in order to support dotted parameters 2018-01-03 10:43:20 +01:00
Nicolas Bessi d21dfb4ae8 Add doctstring and remove dead code 2018-01-03 10:43:20 +01:00
Nicolas Bessi 1fa8ece909 Add git support to get revision 2018-01-03 10:43:20 +01:00
Nicolas Bessi 23c88f1a60 Port server environment to version 8.0 2018-01-03 10:43:20 +01:00
Nicolas Bessi 49b0d9229a Moving server environment module and sample module 2018-01-03 10:43:20 +01:00
Stéphane Bidoul 054da243a9 move all modules to __unported__ on master branch and set installable=False 2018-01-03 10:43:20 +01:00
Yannick Vaucher 4b815dd0c0 [PEP8] server_environment 2018-01-03 10:43:20 +01:00
Sandy Carter 196ab57ec9 Generate .pot files 2018-01-03 10:43:20 +01:00
Alexandre Fayolle 3206c028bb [FIX] name error in import 2018-01-03 10:43:20 +01:00
Alexandre Fayolle 4f22841f77 [7.0] 1st pass at porting server_environment 2018-01-03 10:43:20 +01:00