Skip to content

Commit

Permalink
[FIX] quants can be more than one on _gather function result
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisOForgeFlow committed Sep 26, 2023
1 parent 34d92f4 commit 06525e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rma/wizards/rma_make_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@ def action_create_picking(self):
"lot_ids": [(6, 0, move.rma_line_id.lot_id.ids)],
}
)
quant = self.env["stock.quant"]._gather(
quants = self.env["stock.quant"]._gather(
move.product_id, move.location_id, lot_id=move.rma_line_id.lot_id
)
move.move_line_ids.write(
{
"product_uom_qty": 1 if picking_type == "incoming" else 0,
"qty_done": 0,
"package_id": quant.package_id.id if quant.package_id else None,
"package_id": len(quants) == 1 and quants.package_id.id,
}
)
elif move.product_id.tracking == "lot":
Expand Down

0 comments on commit 06525e4

Please sign in to comment.