Skip to content

Commit

Permalink
[FIX] rma: outgoing moves and pickings
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidJForgeFlow committed Apr 26, 2023
1 parent a898c17 commit 19cfe3a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rma/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 19cfe3a

Please sign in to comment.