changeset e7a0551004f7 in modules/account_invoice:5.4
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=e7a0551004f7
description:
Consider also invoices with zero lines as credit notes
issue8943
review284621002
(grafted from ae31d47e133cfbe3e49de3b85631dc54771509bd)
diffstat:
invoice.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r d1b914953cc5 -r e7a0551004f7 invoice.py
--- a/invoice.py Wed Dec 11 18:40:23 2019 +0100
+++ b/invoice.py Tue Dec 24 17:42:56 2019 +0100
@@ -1053,7 +1053,7 @@
pattern.setdefault('fiscalyear', fiscalyear.id)
pattern.setdefault('period', period.id)
invoice_type = self.type
- if (all(l.amount < 0 for l in self.lines if l.product)
+ if (all(l.amount <= 0 for l in self.lines if l.product)
and self.total_amount < 0):
invoice_type += '_credit_note'
else: