From 4e514fd57afd22b9651467fcf8aaeb378855f4ce Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Wed, 8 Jan 2020 10:48:30 +0100 Subject: [PATCH] FIX issue6253.diff From account_invoice changeset f2b2e0b2 --- issue6253.diff | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/issue6253.diff b/issue6253.diff index 870c715..f0451b2 100644 --- a/issue6253.diff +++ b/issue6253.diff @@ -1,7 +1,8 @@ -diff -r 6c85f394741c invoice.py ---- a/trytond/trytond/modules/account_invoice/invoice.py Wed Jan 24 20:14:28 2018 +0100 -+++ b/trytond/trytond/modules/account_invoice/invoice.py Wed Feb 07 15:39:49 2018 +0100 -@@ -1020,6 +1020,11 @@ +diff --git a/invoice.py b/invoice.py +index e58e444..5d44cd7 100644 +--- a/trytond/trytond/modules/account_invoice/invoice.py ++++ b/trytond/trytond/modules/account_invoice/invoice.py +@@ -992,6 +992,11 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): invoice.number = invoice.get_next_number() cls.save(invoices) @@ -13,11 +14,11 @@ diff -r 6c85f394741c invoice.py def get_next_number(self, pattern=None): pool = Pool() Sequence = pool.get('ir.sequence.strict') -@@ -1040,11 +1045,7 @@ +@@ -1013,11 +1018,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin): 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: