Use transaction date as origin date when value date is empty

issue11292
review366831002
(grafted from 3e51b8608797844e8fc318ceac7ae5440cd0b7fc)

--HG--
branch : 6.0
This commit is contained in:
Sergi Almacellas Abellana committed 2022-03-09 16:49:29 +01:00
1 parent 7e176fe303
commit 9eece68233
1 file changed
+4 -1
+4 -1
View File
@@ -77,7 +77,10 @@ class ImportStatement(metaclass=PoolMeta):
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: