summaryrefslogtreecommitdiff
path: root/addons/l10n_ch/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/l10n_ch/__init__.py')
-rw-r--r--addons/l10n_ch/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/l10n_ch/__init__.py b/addons/l10n_ch/__init__.py
index 15bb04a1202..45936de37a4 100644
--- a/addons/l10n_ch/__init__.py
+++ b/addons/l10n_ch/__init__.py
@@ -15,8 +15,7 @@ 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.
- ch_country = env.ref('base.ch')
- for company in env['res.company'].search([('partner_id.country_id', '=', ch_country.id)]):
+ for company in env['res.company'].search([('partner_id.country_id.code', '=', "CH")]):
res_config_id = env['res.config.settings'].create({
'company_id': company.id,
'group_cash_rounding': True