changeset 9e7744f69917 in modules/sale:5.8
details: https://hg.tryton.org/modules/sale?cmd=changeset;node=9e7744f69917
description:
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
(grafted from abaeaa2598aa6463dd61ca91b06979820be3cc64)
diffstat:
sale.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r 3808d7abd3f0 -r 9e7744f69917 sale.py
--- a/sale.py Fri Dec 11 15:44:03 2020 +0100
+++ b/sale.py Wed Dec 16 21:24:07 2020 +0100
@@ -1452,6 +1452,8 @@
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: