changeset 7af1d74113fa in modules/sale_shipment_cost:5.8
details:
https://hg.tryton.org/modules/sale_shipment_cost?cmd=changeset;node=7af1d74113fa
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 e69acd2ccf0b18c4a280437adc95f9dd49ee8fe3)
diffstat:
stock.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r ff1a4bb29213 -r 7af1d74113fa stock.py
--- a/stock.py Fri Dec 11 15:44:03 2020 +0100
+++ b/stock.py Wed Dec 16 21:24:07 2020 +0100
@@ -88,6 +88,8 @@
cost = Currency.compute(self.cost_currency, cost,
invoice.currency, round=False)
invoice_line.unit_price = round_price(cost)
+ invoice_line.currency = invoice.currency
+ invoice_line.company = invoice.company
taxes = []
pattern = self._get_cost_tax_rule_pattern()