diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index ffae12f070c..7bb0718c6d7 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -715,7 +715,7 @@ class WizardMultiChartsAccounts(models.TransientModel): if company_id: company = self.env['res.company'].browse(company_id) currency_id = company.on_change_country(company.country_id.id)['value']['currency_id'] - res.update({'currency_id': currency_id.id}) + res.update({'currency_id': currency_id}) chart_templates = account_chart_template.search([('visible', '=', True)]) if chart_templates: diff --git a/odoo/addons/base/res/res_company.py b/odoo/addons/base/res/res_company.py index 81d0ac2a8e0..3a0ad5a1a14 100644 --- a/odoo/addons/base/res/res_company.py +++ b/odoo/addons/base/res/res_company.py @@ -258,8 +258,8 @@ class Company(models.Model): self.ensure_one() currency_id = self._get_user_currency() if country_id: - currency_id = self.env['res.country'].browse(country_id).currency_id.id - return {'value': {'currency_id': currency_id}} + currency_id = self.env['res.country'].browse(country_id).currency_id + return {'value': {'currency_id': currency_id.id}} @api.onchange('country_id') def _onchange_country_id_wrapper(self):