mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
[FIX] potentiel record rule error when saving account config page
Scenario: if you have account_invoice_inter_company from OCA/multi-company, and you use it to make inter-company invoices. Without the related=True on the country_id field, when saving the account config page, it will trigger a write on the country of the partner which will, via invalidate the computed field 'src_dest_country_id' which will trigger a write on an invoices in another company, which will result in a record rule error!!!
This commit is contained in:
@@ -30,4 +30,4 @@ class AccountConfigSettings(models.TransientModel):
|
||||
intrastat_accessory_costs = fields.Boolean(
|
||||
related='company_id.intrastat_accessory_costs')
|
||||
country_id = fields.Many2one(
|
||||
related='company_id.country_id')
|
||||
related='company_id.country_id', readonly=True)
|
||||
|
||||
Reference in New Issue
Block a user