[FIX] l10n_ch: fix missing renaming of settings

account.config.settings has been renamed by res.config.settings, see 781a03b2bc
This commit is contained in:
Laurent Smet
2017-09-05 15:02:30 +02:00
parent 160001ca68
commit fe2bdc2649
+4 -2
View File
@@ -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
})