Skip to content

Commit

Permalink
[FIX] purchase_sale_stock_inter_company: use reserved_qty instead of …
Browse files Browse the repository at this point in the history
…product_qty in stock.move.line
  • Loading branch information
JordiBForgeFlow committed Jun 12, 2023
1 parent d9f3d5d commit 64269a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions purchase_sale_stock_inter_company/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ def _action_done(self):
"move_line_ids"
)
for po_move_line in po_move_lines:
if po_move_line.product_qty >= qty_done:
if po_move_line.reserved_qty >= qty_done:
po_move_line.qty_done = qty_done
qty_done = 0.0
else:
po_move_line.qty_done = po_move_line.product_qty
qty_done -= po_move_line.product_qty
po_move_line.qty_done = po_move_line.reserved_qty
qty_done -= po_move_line.reserved_qty
po_picks |= po_move_line.picking_id
if qty_done and po_move_lines:
po_move_lines[-1:].qty_done += qty_done
Expand Down

0 comments on commit 64269a5

Please sign in to comment.