Do not compare base to 0 if it is None
issue10657 review369471002
This commit is contained in:
1 parent
857dc2be6d
commit
e3ba424efe
1 file changed
+5
-4
+5
-4
@@ -2564,10 +2564,11 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
|
||||
with Transaction().set_context(**context):
|
||||
tax = Tax(self.tax.id)
|
||||
self.description = tax.description
|
||||
if self.base >= 0:
|
||||
self.account = tax.invoice_account
|
||||
else:
|
||||
self.account = tax.credit_note_account
|
||||
if self.base is not None:
|
||||
if self.base >= 0:
|
||||
self.account = tax.invoice_account
|
||||
else:
|
||||
self.account = tax.credit_note_account
|
||||
|
||||
@fields.depends('tax', 'base', 'amount', 'manual', 'invoice',
|
||||
'_parent_invoice.currency')
|
||||
|
||||
Reference in new issue
Block a user