From bdf0adb5343413b1d58e48fa090d2ad0c6de9e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 29 Dec 2021 12:25:33 +0100 Subject: [PATCH] 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) --HG-- branch : 6.0 --- product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product.py b/product.py index 92dbd05fe8..37af5acddb 100644 --- a/product.py +++ b/product.py @@ -595,7 +595,7 @@ class ProductQuantitiesByWarehouse(ModelSQL, ModelView): & 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: