From 822966d25d0f46f69c4d400d758b60f3a628139b Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Fri, 8 Jan 2016 16:31:58 +0100 Subject: [PATCH] [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 --- openerp/addons/base/res/res_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openerp/addons/base/res/res_config.py b/openerp/addons/base/res/res_config.py index db01d2595fd..958648275b9 100644 --- a/openerp/addons/base/res/res_config.py +++ b/openerp/addons/base/res/res_config.py @@ -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']: