From 98f93df70e2e99a3d258e4e0539fe42a754b362a Mon Sep 17 00:00:00 2001 From: DavidJForgeFlow Date: Tue, 2 May 2023 10:17:08 +0200 Subject: [PATCH] [FIX] rma: get_move_rma dropship --- rma/models/rma_order_line.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rma/models/rma_order_line.py b/rma/models/rma_order_line.py index f9e03741..7b8b6c2a 100644 --- a/rma/models/rma_order_line.py +++ b/rma/models/rma_order_line.py @@ -68,7 +68,7 @@ class RmaOrderLine(models.Model): if last_usage == "internal" and first_usage != "internal": moves |= move elif last_usage == "supplier" and first_usage == "customer": - moves |= moves + moves |= move return moves @api.model @@ -107,7 +107,10 @@ class RmaOrderLine(models.Model): m.location_id.usage == "supplier" or m.location_id.usage == "customer" ) - and m.location_dest_id.usage == "internal" + and ( + m.location_dest_id.usage == "internal" + or m.location_dest_id.usage == "supplier" + ) ) elif direction == "out": moves = rec.move_ids.filtered( @@ -116,7 +119,10 @@ class RmaOrderLine(models.Model): m.location_dest_id.usage == "supplier" or m.location_dest_id.usage == "customer" ) - and m.location_id.usage == "internal" + and ( + m.location_id.usage == "internal" + or m.location_id.usage == "supplier" + ) ) for move in moves: # If the move is part of a chain don't count it