Files
odoo_source/addons/base_setup
Yannick Tivisse 3055b00c44 [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.
2017-06-19 17:37:38 +02:00
..