Skip to content

Commit bed3c59

Browse files
[17.0][MIG] mrp_production_quant_manual_assign: Migration to 17.0
1 parent 6081366 commit bed3c59

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

mrp_production_quant_manual_assign/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "Production - Manual Quant Assignment",
7-
"version": "16.0.1.0.0",
7+
"version": "17.0.1.0.0",
88
"category": "Manufacturing",
99
"license": "AGPL-3",
1010
"author": "Quartile Limited, ForgeFlow, Odoo Community Association (OCA)",

mrp_production_quant_manual_assign/views/mrp_production_views.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
77
<field name="arch" type="xml">
88
<xpath
9-
expr="//field[@name='move_raw_ids']//button[@name='action_show_details']"
10-
position="before"
9+
expr="//field[@name='move_raw_ids']//field[@name='lot_ids']"
10+
position="after"
1111
>
1212
<button
1313
name="%(stock_quant_manual_assign.assign_manual_quants_action)d"

mrp_production_quant_manual_assign/wizards/assign_manual_quants.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def _prepare_wizard_line(self, move, quant):
3737
and ml.package_id == quant.package_id
3838
)
3939
)
40-
line["qty_done"] = sum(move_lines.mapped("qty_done"))
40+
line["qty_done"] = sum(move_lines.mapped("quantity"))
4141
line["to_consume_now"] = bool(line["qty_done"])
4242
return line
4343

@@ -53,13 +53,11 @@ def assign_quants(self):
5353
).mapped("lot_id")
5454
for ml in move.move_line_ids:
5555
if ml.lot_id in lots_to_consume:
56-
ml.qty_done = ml.reserved_uom_qty
57-
elif float_is_zero(
58-
ml.reserved_uom_qty, precision_digits=precision_digits
59-
):
56+
ml.picked = True
57+
elif float_is_zero(ml.quantity, precision_digits=precision_digits):
6058
ml.unlink()
6159
else:
62-
ml.qty_done = 0.0
60+
ml.quantity = 0
6361
return res
6462

6563

0 commit comments

Comments
 (0)