From f841aab429e60f38c960558fe3d72ba93305cd96 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 --- stock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stock.py b/stock.py index 19713a8b1c..65d6411fba 100644 --- a/stock.py +++ b/stock.py @@ -88,6 +88,8 @@ class ShipmentOut(metaclass=PoolMeta): 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()