changeset 7b53cba709e2 in modules/account_tax_cash:5.0
details:
https://hg.tryton.org/modules/account_tax_cash?cmd=changeset;node=7b53cba709e2
description:
Always filter out invoice without move in _update_tax_cash_basis
process and cancel can call the method on invoice without move for
example if
the invoice is empty.
issue8348
review263531002
(grafted from 8a7b4e244a0d0dc5dc4c38d26b288a544f8be6be)
diffstat:
account.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 237df4521f03 -r 7b53cba709e2 account.py
--- a/account.py Mon Apr 22 11:08:06 2019 +0200
+++ b/account.py Mon Jun 03 15:27:41 2019 +0200
@@ -273,7 +273,6 @@
if 'payment_lines' in values:
invoices.extend(records)
invoices = cls.browse(sum(args[0:None:2], []))
- invoices = [i for i in invoices if i.move]
cls._update_tax_cash_basis(invoices)
@classmethod
@@ -301,6 +300,8 @@
date = Transaction().context.get('payment_date', Date.today())
periods = {}
for invoice in invoices:
+ if not invoice.move:
+ continue
if invoice.company not in periods:
periods[invoice.company] = Period.find(
invoice.company.id, date=date)