changeset 1bd1a4e59374 in modules/account_statement:default
details:
https://hg.tryton.org/modules/account_statement?cmd=changeset&node=1bd1a4e59374
description:
Test reconciled property of invoices instead of its state
We should not use state as the invoices are now processed in background
so
its state its not updated until the end of the transaction.
issue10233
review359431002
diffstat:
statement.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 4fa6fd2e3dda -r 1bd1a4e59374 statement.py
--- a/statement.py Sun Mar 21 16:09:13 2021 +0100
+++ b/statement.py Tue Mar 30 09:40:29 2021 +0200
@@ -523,10 +523,11 @@
cls.write(statements, {
'state': 'validated',
})
- common_lines = Line.search([
+ common_lines = [l for l in Line.search([
('statement.state', '=', 'draft'),
- ('invoice.state', '=', 'paid'),
+ ('invoice.state', 'in', ['posted', 'paid']),
])
+ if l.invoice.reconciled]
if common_lines:
warning_key = '_'.join(str(l.id) for l in common_lines)
if Warning.check(warning_key):