From 19cfe3a991f2a267ce07ec325c985b938da65ea1 Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Mon, 3 Apr 2023 15:38:17 +0200 Subject: [PATCH] [FIX] rma: outgoing moves and pickings --- rma/models/rma_order_line.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rma/models/rma_order_line.py b/rma/models/rma_order_line.py index 9ba20f07d..d5a4474b2 100644 --- a/rma/models/rma_order_line.py +++ b/rma/models/rma_order_line.py @@ -77,7 +77,10 @@ def _get_out_moves(self): for move in self.move_ids: first_usage = move._get_first_usage() last_usage = move._get_last_usage() - if first_usage == "internal" and last_usage != "internal": + if first_usage in ("internal", "production") and last_usage in ( + "customer", + "supplier", + ): moves |= move elif first_usage == "supplier" and last_usage == "customer": moves |= moves @@ -89,7 +92,10 @@ def _get_out_pickings(self): for move in self.move_ids: first_usage = move._get_first_usage() last_usage = move._get_last_usage() - if first_usage in ("internal", "production") and last_usage != "internal": + if first_usage in ("internal", "production") and last_usage in ( + "customer", + "supplier", + ): pickings |= move.picking_id elif last_usage == "customer" and first_usage == "supplier": pickings |= move.picking_id