diff --git a/stock_barcodes/wizard/stock_barcodes_read_todo.py b/stock_barcodes/wizard/stock_barcodes_read_todo.py index de69ef44991..bcb304cda49 100644 --- a/stock_barcodes/wizard/stock_barcodes_read_todo.py +++ b/stock_barcodes/wizard/stock_barcodes_read_todo.py @@ -69,7 +69,18 @@ def action_todo_next(self): self.state = "done_forced" self.line_ids.barcode_scan_state = "done_forced" for sml in self.line_ids: - if sml.reserved_uom_qty != sml.qty_done and sml.move_id.state != "waiting": + if ( + float_compare( + sml.reserved_uom_qty, + sml.qty_done, + precision_rounding=sml.product_uom_id.rounding, + ) + == 0 + ): + continue + if sml.move_id.state == "confirmed" and sml.qty_done: + sml.move_id.state = "partially_available" + if sml.move_id.state in ["partially_available", "assigned"]: sml.reserved_uom_qty = sml.qty_done if self.is_extra_line or not self.is_stock_move_line_origin: barcode_backorder_action = self.env.context.get(