Skip to content
Snippets Groups Projects
Unverified Commit 822966d2 authored by Alexandre Fayolle's avatar Alexandre Fayolle Committed by Martin Trigaux
Browse files

[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
parent db935df3
No related branches found
No related tags found
No related merge requests found
......@@ -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']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment