Guewen Baconnier
6ca6d36ac1
Remove required from tech_name mixin
...
In some cases, we want to use a tech_name, but we do not use server
environment on all the records, so tech_name should not be required.
2021-03-31 20:41:12 +02:00
Simone Orsi
27857f2966
Add mixin for tech name
2021-03-31 16:25:23 +02:00
Denis Roussel
312eb90cbb
[FIX] server_environment: Change import for Serialized field
2020-03-09 10:13:55 +01:00
Stéphane Bidoul (ACSONE)
b53480fc8b
Add missing _descriptions
2018-11-13 12:30:21 +01:00
Stéphane Bidoul (ACSONE)
7de4657d24
[IMP] copyright headers
...
Use GPL licenses everywhere, to match original code.
2018-11-13 11:05:47 +01:00
Guewen Baconnier
06a5dc0fae
Fix iteration on records
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
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
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
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