[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:
Alexandre Fayolle
2016-05-02 14:21:15 +02:00
committed by Martin Trigaux
parent db935df398
commit 822966d25d
+2
View File
@@ -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']: