changeset d10733408252 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=d10733408252
description:
Do not convert empty grouped date when computing quantities
When there is a move without planned nor effective date, the computed
date is
None.
issue11895
review418731005
diffstat:
move.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 49fa6a5f196e -r d10733408252 move.py
--- a/move.py Thu Nov 24 19:16:51 2022 +0100
+++ b/move.py Thu Nov 24 19:22:28 2022 +0100
@@ -1569,7 +1569,7 @@
key = list(line[1:-1])
if 'date' in grouping:
i = grouping.index('date')
- if not isinstance(key[i], datetime.date):
+ if key[i] and not isinstance(key[i], datetime.date):
key[i] = datetime.date.fromisoformat(key[i])
key = tuple(key)
quantity = line[-1]