From f535ce3ebb43ae6cd2384bc440fcb7e29774b339 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Tue, 7 Nov 2023 16:44:41 +0100 Subject: [PATCH] fixup! fixup! shopfloor_reception: Fix product_uom_qty on move line --- shopfloor_reception/services/reception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shopfloor_reception/services/reception.py b/shopfloor_reception/services/reception.py index 01fabf90c89..7cb81bb403a 100644 --- a/shopfloor_reception/services/reception.py +++ b/shopfloor_reception/services/reception.py @@ -1270,7 +1270,8 @@ def _auto_post_line(self, selected_line): # Always keep the quantity todo at zero, the same is done # in Odoo when move lines are created manually (setting) lines_with_qty_todo = selected_line.move_id.move_line_ids.filtered( - "product_uom_qty" + lambda line: line.state not in ("cancel", "done") + and line.product_uom_qty > 0 ) if lines_with_qty_todo: lines_with_qty_todo.product_uom_qty = 0