[FIX] base: res.config default value on selection fields
Since 3d8f7c2f, res.config support selection fields to set groups and install
modules using a selection field instead of boolean.
While the `module_*` fields are correctly casted from boolean to integers, it
was not the case with `group_*` fields.
This commit forces the conversion to get the expected field format value.
Closes #10373
This commit is contained in:
@@ -521,6 +521,8 @@ class res_config_settings(osv.osv_memory, res_config_module_installation_mixin):
|
||||
# groups: which groups are implied by the group Employee
|
||||
for name, groups, implied_group in classified['group']:
|
||||
res[name] = all(implied_group in group.implied_ids for group in groups)
|
||||
if self._fields[name].type == 'selection':
|
||||
res[name] = int(res[name])
|
||||
|
||||
# modules: which modules are installed/to install
|
||||
for name, module in classified['module']:
|
||||
|
||||
Reference in New Issue
Block a user