Adapt issue6253.diff to review284621002.

This commit is contained in:
Albert Cervera i Areny 2019-12-30 16:17:49 +01:00
parent b039f0c38c
commit 7c80810ef7
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ diff -r 6c85f394741c invoice.py
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: