issue11702 - [stock] Exclude cancelled moves in product quantities by warehouse move

This commit is contained in:
Raimon Esteve 2022-09-22 13:23:44 +02:00
parent 6461faca97
commit e098095988
2 changed files with 14 additions and 1 deletions

13
issue11702.diff Normal file
View file

@ -0,0 +1,13 @@
diff --git a/trytond/trytond/modules/stock/product.py b/trytond/trytond/modules/stock/product.py
index 7b38d5e..e4da113 100644
--- a/trytond/trytond/modules/stock/product.py
+++ b/trytond/trytond/modules/stock/product.py
@@ -935,7 +935,7 @@ class ProductQuantitiesByWarehouseMove(ModelSQL, ModelView):
& move.to_location.in_(
warehouse.select(warehouse.id))))
& ((date_column < today) & (move.state == 'done')
- | (date_column >= today)),
+ | (date_column >= today) & (move.state != 'cancelled')),
with_=warehouse))
@classmethod

2
series
View file

@ -18,6 +18,7 @@ issue10467.diff # [stock_lot] add lot to grouping when assign try if lot it's re
model.diff # [trytond] Allows dynamic fields in Model as required by the wizard in sale_pos_template_quantities
issue9802.diff # [stock] Improve performance when partially assigning moves
issue11702.diff # [stock] Exclude cancelled moves in product quantities by warehouse move
sao_colors.diff # [sao] Use the same colors as 5.4 version
@ -26,4 +27,3 @@ sao_remove_email.diff # [sao] Removes the email button from the toolbar
worker_logger.diff #[trytond] Move exception handling into transaction to keep the database name
statement_of_account.diff # [account] Cumulate balance of previous fiscal years