changeset ae31d47e133c in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=ae31d47e133c
description:
Consider also invoices with zero lines as credit notes
issue8943
review284621002
diffstat:
invoice.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r ba1b3bfda9bb -r ae31d47e133c invoice.py
--- a/invoice.py Wed Dec 18 09:21:49 2019 +0100
+++ b/invoice.py Tue Dec 24 17:42:56 2019 +0100
@@ -1054,7 +1054,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: