From 2506612d89ddcc764e07ce1839038a954ba7f38c Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Fri, 20 Oct 2023 13:26:18 +0200 Subject: [PATCH] fixup! shopfloor_reception: Fix product_uom_qty on move line --- shopfloor_reception/services/reception.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shopfloor_reception/services/reception.py b/shopfloor_reception/services/reception.py index 201293ab488..01fabf90c89 100644 --- a/shopfloor_reception/services/reception.py +++ b/shopfloor_reception/services/reception.py @@ -775,9 +775,10 @@ def _align_display_product_uom_qty(self, line, response): line_todo = line.product_uom_id._compute_quantity( remaining_todo, move_uom, round=False ) - response["data"]["set_quantity"]["selected_move_line"][0][ - "quantity" - ] = line_todo + # If more has been done keep the quantity to zero + response["data"]["set_quantity"]["selected_move_line"][0]["quantity"] = max( + line_todo, 0 + ) return response def _before_state__set_quantity(self, picking, line, message=None):