Don't negate credit line quantity when is empty

issue6508
review40371002
This commit is contained in:
Sergi Almacellas Abellana committed 2017-05-17 16:46:27 +02:00
1 parent 294ab17541
commit 0923543707
1 file changed
+4 -1
+4 -1
View File
@@ -2033,7 +2033,10 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
'''
line = self.__class__()
line.origin = self
line.quantity = -self.quantity
if self.quantity:
line.quantity = -self.quantity
else:
line.quantity = self.quantity
for field in ('sequence', 'type', 'invoice_type', 'unit_price',
'description', 'unit', 'product', 'account'):