Skip to content

Commit

Permalink
[IMP] stock_move_line_force_done: Add product_package_id and product_…
Browse files Browse the repository at this point in the history
…package_qty in vals
  • Loading branch information
unaiberis committed Jan 30, 2025
1 parent 3c9b478 commit f740733
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions stock_move_line_force_done/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Copyright 2022 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models


Expand All @@ -15,7 +13,14 @@ def button_force_done_detailed_operations(self):
pending_move_lines.unlink()
for move in picking.move_ids:
if not move.move_line_ids:
move_line_obj.create(move._prepare_move_line_vals())
move_line_vals = move._prepare_move_line_vals()
move_line_vals.update(
{
"product_package_id": move.product_package_id.id,
"product_package_qty": move.product_package_qty,
}
)
move_line_obj.create(move_line_vals)
line = move.move_line_ids[:1]
if line and line.qty_done != move.product_uom_qty:
line.qty_done = move.product_uom_qty

0 comments on commit f740733

Please sign in to comment.