changeset f259cba8516c in modules/sale_complaint:default
details:
https://hg.tryton.org/modules/sale_complaint?cmd=changeset;node=f259cba8516c
description:
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
diffstat:
complaint.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r dd8abca2a3d5 -r f259cba8516c complaint.py
--- a/complaint.py Wed Jul 29 22:51:13 2020 +0200
+++ b/complaint.py Sun Aug 02 23:56:32 2020 +0200
@@ -498,9 +498,11 @@
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):