changeset e301e8069ff6 in modules/stock:6.0
details: https://hg.tryton.org/modules/stock?cmd=changeset&node=e301e8069ff6
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 dccf5e96f159 -r e301e8069ff6 product.py
--- a/product.py        Sat Jan 01 18:10:22 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:

Reply via email to