changeset aa5c1d872076 in modules/project_invoice:5.8
details:
https://hg.tryton.org/modules/project_invoice?cmd=changeset;node=aa5c1d872076
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 325d47f46c7a7719f4ecdd058f692d2c301ed92c)
diffstat:
project.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r ee943612030a -r aa5c1d872076 project.py
--- a/project.py Tue Dec 08 17:36:30 2020 +0100
+++ b/project.py Wed Dec 16 21:24:07 2020 +0100
@@ -543,6 +543,8 @@
invoice_line.unit_price = key['unit_price']
invoice_line.quantity = quantity
invoice_line.unit = key['unit']
+ invoice_line.currency = invoice.currency
+ invoice_line.company = invoice.company
taxes = []
pattern = invoice_line._get_tax_rule_pattern()