[FIX] intrastat_product: Prevent error when adding transaction details on invoices

The exclude_from_invoice_tab field does not exist in v16
This commit is contained in:
Víctor Martínez
2023-11-09 09:17:30 +01:00
committed by Alexis de Lattre
parent 09fb1577bd
commit 99bcb567af

View File

@@ -202,8 +202,7 @@ class AccountMoveIntrastatLine(models.Model):
def _onchange_move_id(self):
moves = self.mapped("move_id")
dom = [
("exclude_from_invoice_tab", "=", False),
("display_type", "=", False),
("display_type", "=", "product"),
("id", "in", moves.mapped("invoice_line_ids").ids),
("id", "not in", moves.mapped("intrastat_line_ids.invoice_line_id").ids),
]