From 5b69bef5a3882ad1172c84c9c8d64792cb47aeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 16 Dec 2020 21:24:07 +0100 Subject: [PATCH] Enforce currency, invoice_type and party values between invoice and lines The currency of an invoice line must always be the same as the invoice. For the invoice_type and party they must be the same only if set. issue9854 review324581002 --- purchase.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/purchase.py b/purchase.py index 8b7d4a4c56..0adc024810 100644 --- a/purchase.py +++ b/purchase.py @@ -34,8 +34,6 @@ class Purchase(metaclass=PoolMeta): 'invoice': None, 'invoice_type': invoice.type, 'party': invoice.party.id, - 'currency': invoice.currency.id, - 'company': invoice.company.id, }) InvoiceLine.delete(lines_to_delete) Invoice.cancel([invoice])