diff options
| author | Yannick Tivisse <yti@odoo.com> | 2017-06-13 13:38:47 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-06-19 17:37:38 +0200 |
| commit | 3055b00c4454fa96d71c0350b7328a4918a04e80 (patch) | |
| tree | 46cb046bd9ed8d62a17b1cde5d4f2d5fa7d21ab0 /odoo/addons/base/module/wizard/base_module_configuration_view.xml | |
| parent | 3eb37589ab7a2e58922a69f42bbc1ec443df44ed (diff) | |
[IMP] base: Introduce generic methods `get_default_field` and `set_fields`
Method `get_default_fields`
===========================
Currently all the methods beginning by `get_default` are used to fetch their default values, usually by looking in the ir.config_parameter table.
As several methods `get_default_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.
Method `set_fields`
===================
Currently all the methods beginning by `set_` are used to set their values, usually in the ir.config_parameter table.
As several methods `set_fields` have been defined in res_config classes, it better to define it in base and calling to super to avoid side effects like the following example
- 2 classes that override the same class and define the same method. In that case one method will never be called, as it is ovewritten by the other.
Methods `get_default_foo` and `set_foo`
=======================================
This commit deprecates the method starting with `get_default_` or `set_` in the res.config models. A warning is raised in that case.
Diffstat (limited to 'odoo/addons/base/module/wizard/base_module_configuration_view.xml')
0 files changed, 0 insertions, 0 deletions
