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