Do not set unit price or quantity if empty
The unit price or the quantity of the credit note line should not be updated if the value from the complain invoice line is None as it means we must use the original one. issue9497 review290651002
This commit is contained in:
+4
-2
@@ -498,9 +498,11 @@ class Action(ModelSQL, ModelView):
|
||||
if self.invoice_lines:
|
||||
invoice_lines = [l.line for l in self.invoice_lines]
|
||||
line2qty = {l.line: l.quantity
|
||||
for l in self.invoice_lines}
|
||||
for l in self.invoice_lines
|
||||
if l.quantity is not None}
|
||||
line2price = {l.line: l.unit_price
|
||||
for l in self.invoice_lines}
|
||||
for l in self.invoice_lines
|
||||
if l.unit_price is not None}
|
||||
else:
|
||||
invoice_lines = invoice.lines
|
||||
elif isinstance(self.complaint.origin, Line):
|
||||
|
||||
Reference in New Issue
Block a user