From d62bcca3ec1d30315610ba9b57620df3019d6c2b Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Tue, 21 Feb 2023 11:31:47 +0100 Subject: [PATCH] [FIX] rma: in multi step routes, only reserve first step We shoul not force reservation on next steps on a multi step route, oherwise a inconsistency is generated and the transfers cannot be processed or cancel so the user gets stuck ("it is not possible to unreserve more products that you have in stock" error). --- rma/wizards/rma_make_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rma/wizards/rma_make_picking.py b/rma/wizards/rma_make_picking.py index 6d20e82b..337be30f 100644 --- a/rma/wizards/rma_make_picking.py +++ b/rma/wizards/rma_make_picking.py @@ -206,7 +206,7 @@ class RmaMakePicking(models.TransientModel): # Force the reservation of the RMA specific lot for incoming shipments. # FIXME: still needs fixing, not reserving appropriate serials. for move in pickings.move_lines.filtered( - lambda x: x.state not in ("draft", "cancel", "done") + lambda x: x.state not in ("draft", "cancel", "done", "waiting") and x.rma_line_id and x.product_id.tracking in ("lot", "serial") and x.rma_line_id.lot_id