changeset fee8b42d45df in modules/account_statement_aeb43:6.2
details:
https://hg.tryton.org/modules/account_statement_aeb43?cmd=changeset&node=fee8b42d45df
description:
Use transaction date as origin date when value date is empty
issue11292
review366831002
(grafted from 3e51b8608797844e8fc318ceac7ae5440cd0b7fc)
diffstat:
statement.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 69a6e4c55900 -r fee8b42d45df statement.py
--- a/statement.py Mon Nov 01 17:19:47 2021 +0100
+++ b/statement.py Wed Mar 09 16:49:29 2022 +0100
@@ -75,7 +75,10 @@
pool = Pool()
Origin = pool.get('account.statement.origin')
origin = Origin()
- origin.date = transaction.valueDate
+ try:
+ origin.date = transaction.valueDate
+ except ValueError:
+ origin.date = transaction.transactionDate
origin.amount = transaction.amount
descriptions = []
for item in transaction.optionalItems: