There's more...

Configuration settings can also have fields named with the default_ prefix. When one of these has a value, the ORM will set it as a global default. The settings field should have a default_model attribute to identify the model affected, and the field name after the default_ prefix identifies the model's field that will have the default value set.

Additionally, fields with none of the three prefixes mentioned can be used for other settings, but you will need to implement the logic to populate their values, using the get_default_ name prefixed methods, and to act when their values are edited, using the set_ name prefixed methods.

For those who would like to go deeper into the details of the configuration settings, the best documentation is in Odoo's source code in ./odoo/addons/base/models/res_config.py, which is extensively commented on with all the details explained.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset