[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
This commit is contained in:
João Marques
2021-05-10 09:15:10 +01:00
parent 26d5f4fbaf
commit 84a9dffd7c
2 changed files with 2 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ class AccountMove(models.Model):
tracking=True, tracking=True,
check_company=True, check_company=True,
help="Intrastat nature of transaction", help="Intrastat nature of transaction",
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]",
) )
intrastat_transport_id = fields.Many2one( intrastat_transport_id = fields.Many2one(
comodel_name="intrastat.transport_mode", comodel_name="intrastat.transport_mode",

View File

@@ -9,10 +9,7 @@
expr="//page[@name='other_info']//field[@name='invoice_incoterm_id']" expr="//page[@name='other_info']//field[@name='invoice_incoterm_id']"
position="after" position="after"
> >
<field <field name="intrastat_transaction_id" />
name="intrastat_transaction_id"
domain="[('company_id', '=', company_id)]"
/>
<field name="intrastat" invisible="1" /> <field name="intrastat" invisible="1" />
<field <field
name="intrastat_transport_id" name="intrastat_transport_id"