diff --git a/addons/l10n_ch/__init__.py b/addons/l10n_ch/__init__.py index bc5741375fc..66c98402d11 100644 --- a/addons/l10n_ch/__init__.py +++ b/addons/l10n_ch/__init__.py @@ -14,8 +14,10 @@ def init_settings(env): '''If the company is localized in Switzerland, activate the cash rounding by default. ''' # The cash rounding is activated by default only if the company is localized in Switzerland. - for company in env['res.company'].search([('country_id', '=', env.ref('base.ch').id)]): - res_config_id = env['account.config.settings'].create({ + for company in env['res.company'].search([]): + if company.country_id != env.ref('base.ch'): + continue + res_config_id = env['res.config.settings'].create({ 'company_id': company.id, 'group_cash_rounding': True })