changeset d2cab142c9f5 in modules/purchase:5.8
details: https://hg.tryton.org/modules/purchase?cmd=changeset;node=d2cab142c9f5
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 2feee05d7a0b1b364afc05904b3112f5fa81447e)
diffstat:
purchase.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r a868f9e02660 -r d2cab142c9f5 purchase.py
--- a/purchase.py Fri Dec 11 15:44:03 2020 +0100
+++ b/purchase.py Wed Dec 16 21:24:07 2020 +0100
@@ -1480,6 +1480,8 @@
invoice_line.unit_price = self.unit_price
invoice_line.taxes = self.taxes
invoice_line.invoice_type = 'in'
+ invoice_line.currency = self.currency
+ invoice_line.company = self.company
if self.product:
invoice_line.account = self.product.account_expense_used
if not invoice_line.account: