changeset 88ab745f9a55 in modules/account_deposit:default
details:
https://hg.tryton.org/modules/account_deposit?cmd=changeset;node=88ab745f9a55
description:
Do not compare sequence which are None
In Python3, it is no more allowed to compare None with None or any
numeric.
issue7874
review70451002
diffstat:
invoice.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 1c1e589657ae -r 88ab745f9a55 invoice.py
--- a/invoice.py Mon Oct 01 13:02:50 2018 +0200
+++ b/invoice.py Wed Nov 28 09:58:26 2018 +0100
@@ -63,7 +63,11 @@
if amount < 0:
line = self._get_deposit_recall_invoice_line(
amount, account, description)
- line.sequence = max(l.sequence for l in self.lines)
+ try:
+ line.sequence = max(l.sequence for l in self.lines
+ if l.sequence is not None)
+ except ValueError:
+ pass
line.save()
if to_delete:
InvoiceLine.delete(to_delete)