changeset 02a8340a43e5 in modules/stock:6.2
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=02a8340a43e5
description:
Avoid double today record in product quantities by warehouse
We must exclude the stock move on today because we always add a record
for each
product on today with the union.
issue11068
review387531002
(grafted from bea701b3cac5ac6ae8cebb1c517c5981f83e395e)
diffstat:
product.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 37068718edc1 -r 02a8340a43e5 product.py
--- a/product.py Sat Jan 01 18:08:45 2022 +0100
+++ b/product.py Wed Dec 29 12:25:33 2021 +0100
@@ -595,7 +595,7 @@
& move.to_location.in_(
warehouse.select(warehouse.id))))
& ((date_column < today) & (move.state == 'done')
- | (date_column >= today)),
+ | (date_column > today)),
group_by=(date_column, product_column, move.company),
with_=warehouse))
for model, id_ in products: