[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
This commit is contained in:
Lucas Perais (lpe)
2018-06-08 09:45:21 +02:00
parent b0a29532ff
commit f01e298d53
+1 -1
View File
@@ -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'