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
This commit is contained in:
Cédric Krier committed 2020-12-16 21:24:07 +01:00
1 parent e039d2ca3e
commit 3685bd11cb
1 file changed
+1
+1
View File
@@ -915,6 +915,7 @@ class LineConsumption(ModelSQL, ModelView):
def _group_invoice_key(cls, consumption):
return (
('company', consumption.line.subscription.company),
('currency', consumption.line.subscription.currency),
('unit', consumption.line.unit),
('product', consumption.line.service.product),
('unit_price', consumption.line.unit_price),