changeset 39f1cdd3a22d in modules/stock:6.6
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=39f1cdd3a22d
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
(grafted from d10733408252458a6e5dea7a566b398b15ee8e63)
diffstat:
move.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 6d5b9443e86c -r 39f1cdd3a22d move.py
--- a/move.py Thu Nov 17 18:52:49 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]