From 7bb221bad318ffbbc4bee105f0200586240150a0 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 --- sale.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sale.py b/sale.py index 89d8e9567e..93c26521d5 100644 --- a/sale.py +++ b/sale.py @@ -1451,6 +1451,8 @@ class SaleLine(sequence_ordered(), ModelSQL, ModelView): invoice_line.unit_price = self.unit_price invoice_line.taxes = self.taxes invoice_line.invoice_type = 'out' + invoice_line.currency = self.currency + invoice_line.company = self.company if self.product: invoice_line.account = self.product.account_revenue_used if not invoice_line.account: