changeset 1fb3114cbc27 in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=1fb3114cbc27
description:
Do not compare base to 0 if it is None
issue10657
review369471002
diffstat:
invoice.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (19 lines):
diff -r 8376ff151412 -r 1fb3114cbc27 invoice.py
--- a/invoice.py Mon Aug 09 13:18:17 2021 +0200
+++ b/invoice.py Thu Aug 19 22:32:48 2021 +0200
@@ -2564,10 +2564,11 @@
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')