From 8dc3bea390b278dce5ba77be02f7825cad800f14 Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Mon, 9 Dec 2024 09:40:30 +0100 Subject: [PATCH] [FIX] do not reserve done moves --- mrp_production_reserved_purchase_qty/models/stock_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrp_production_reserved_purchase_qty/models/stock_move.py b/mrp_production_reserved_purchase_qty/models/stock_move.py index 07de80d8..8e74b295 100644 --- a/mrp_production_reserved_purchase_qty/models/stock_move.py +++ b/mrp_production_reserved_purchase_qty/models/stock_move.py @@ -64,7 +64,7 @@ def _action_assign(self): reserved_availability = {move: move.reserved_availability for move in self} roundings = {move: move.product_id.uom_id.rounding for move in self} move_line_vals_list = [] - for move in self: + for move in self.filtered(lambda x: x.state != "done"): rounding = roundings[move] missing_reserved_uom_quantity = move.product_uom_qty - \ reserved_availability[move]