anthem
anthem copied to clipboard
Fix define_settings method
In 13.0, the method ResConfigSettings.execute() [0] reset odoo env after installing/uninstalling addons, after this, computed fields misbehave (for instance, after a record creation, they would return an empty value or a CacheMiss)
In 13.0, we can call set_values() which does what we want, before this version, we have to keep calling execute() (which doesn't have the mentioned issue) because it sets the default values and the groups.
[0] https://github.com/odoo/odoo/blob/054d4bc6bc219bcc6b0a64265e8d7e9c7423dbc8/odoo/addons/base/models/res_config.py#L633-L637