Skip to content

Commit 20695a2

Browse files
committed
[FIX] stock_quant_manual_assign: Bug OCA#1527
when using an uom on move line which is different from product uom new field introduced in v16 reserved_uom_qty
1 parent cdf94a5 commit 20695a2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stock_quant_manual_assign/wizard/assign_manual_quants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def assign_quants(self):
6464
if move.picking_type_id.auto_fill_qty_done:
6565
# Auto-fill all lines as done
6666
for ml in move.move_line_ids:
67-
ml.qty_done = ml.product_qty
67+
ml.qty_done = ml.reserved_uom_qty
6868
move._recompute_state()
6969
move.mapped("picking_id")._compute_state()
7070
return {}
@@ -113,7 +113,7 @@ def _prepare_wizard_line(self, move, quant):
113113
and ml.package_id == quant.package_id
114114
)
115115
)
116-
line["qty"] = sum(move_lines.mapped("product_uom_qty"))
116+
line["qty"] = sum(move_lines.mapped("reserved_uom_qty"))
117117
line["selected"] = bool(line["qty"])
118118
line["reserved"] = quant.reserved_quantity - line["qty"]
119119
return line
@@ -198,7 +198,7 @@ def _check_qty(self):
198198
)
199199
)
200200
reserved = quant.reserved_quantity - sum(
201-
move_lines.mapped("product_uom_qty")
201+
move_lines.mapped("reserved_uom_qty")
202202
)
203203
if (
204204
float_compare(

0 commit comments

Comments
 (0)