mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[fix] rma: when using 2 step receipt or delivery, don't count double
This commit is contained in:
@@ -75,6 +75,11 @@ class RmaOrderLine(models.Model):
|
||||
for move in rec.move_ids.filtered(
|
||||
lambda m: m.state in states and op(m.location_id.usage, rec.type)
|
||||
):
|
||||
# If the move is part of a chain don't count it
|
||||
if direction == "out" and move.move_orig_ids:
|
||||
continue
|
||||
elif direction == "in" and move.move_dest_ids:
|
||||
continue
|
||||
qty += product_obj._compute_quantity(move.product_uom_qty, rec.uom_id)
|
||||
return qty
|
||||
|
||||
|
||||
Reference in New Issue
Block a user