From f01e298d53e890c4e371acba901388388b4ccc63 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 6 Jun 2018 15:24:54 +0200 Subject: [PATCH] [FIX] account: in account config, constrain exchange diff journal's domain Before this commit one could choose any journal for the registering exchange rate differences. That could lead to accounting errors down the line After this commit, we apply a domain on the field, and there is no problem afterwards OPW 1851616 closes #25101 --- addons/account/models/res_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/res_config.py b/addons/account/models/res_config.py index 1d10392719d..eea3e6b0dcf 100644 --- a/addons/account/models/res_config.py +++ b/addons/account/models/res_config.py @@ -99,7 +99,7 @@ class AccountConfigSettings(models.TransientModel): ], "Warning", implied_group='account.group_warning_account') currency_exchange_journal_id = fields.Many2one('account.journal', related='company_id.currency_exchange_journal_id', - string="Rate Difference Journal",) + string="Rate Difference Journal", domain="[('company_id', '=', company_id)]") module_account_asset = fields.Boolean(string='Assets management', help='Asset management: This allows you to manage the assets owned by a company or a person. ' 'It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.\n\n'