From 84a9dffd7cddd307a01f0ac009b965cc1e7c2937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Mon, 10 May 2021 09:15:10 +0100 Subject: [PATCH] [FIX] intrastat_product: don't force wrong domain in moves The intrastat transaction domain is already forced in the model and in the field in account.move. It was being incorrectly forced in the move, where it needed to be associated to the same company as the record, but those types can have no company associated TT29582 --- intrastat_product/models/account_move.py | 1 + intrastat_product/views/account_move.xml | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/intrastat_product/models/account_move.py b/intrastat_product/models/account_move.py index 90f2d0c..564f1e9 100644 --- a/intrastat_product/models/account_move.py +++ b/intrastat_product/models/account_move.py @@ -16,6 +16,7 @@ class AccountMove(models.Model): tracking=True, check_company=True, help="Intrastat nature of transaction", + domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", ) intrastat_transport_id = fields.Many2one( comodel_name="intrastat.transport_mode", diff --git a/intrastat_product/views/account_move.xml b/intrastat_product/views/account_move.xml index 3747728..6d0ad07 100644 --- a/intrastat_product/views/account_move.xml +++ b/intrastat_product/views/account_move.xml @@ -9,10 +9,7 @@ expr="//page[@name='other_info']//field[@name='invoice_incoterm_id']" position="after" > - +