Commit Graph

21 Commits

Author SHA1 Message Date
Denis Roussel feeb44db1e [FIX] server_environment: Change import for Serialized field 2020-03-09 10:12:26 +01:00
Stéphane Bidoul (ACSONE) 52338f3ef6
Add missing _descriptions 2018-11-15 14:10:53 +01:00
Stéphane Bidoul (ACSONE) 4f25dc6cc2
[IMP] copyright headers
Use GPL licenses everywhere, to match original code.
2018-11-15 14:06:59 +01:00
Guewen Baconnier fa1110698e Fix iteration on records 2018-07-27 11:45:08 +02:00
Guewen Baconnier a6ae304e49 Add tests and support of _inherits 2018-07-25 17:23:46 +02:00
Guewen Baconnier 04e54e0997 fixup! Fixes for review feedbacks 2018-07-25 13:04:24 +02:00
Guewen Baconnier 05885049d2 fixup! Infer configparser getter from field type 2018-07-25 13:04:09 +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 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 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 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