Skip to content

Commit 36f4313

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

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-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,7 +6,7 @@
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']"
9+
expr="//field[@name='move_raw_ids']//field[@name='group_id']"
1010
position="before"
1111
>
1212
<button
@@ -15,7 +15,7 @@
1515
icon="fa-tags"
1616
title="Manual Quants"
1717
options='{"warn": true}'
18-
attrs="{'invisible':[('state','not in',('confirmed','assigned','partially_available'))]}"
18+
invisible="state not in ('confirmed','assigned','partially_available')"
1919
/>
2020
</xpath>
2121
</field>

mrp_production_quant_manual_assign/wizards/assign_manual_quants.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ 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"))
41-
line["to_consume_now"] = bool(line["qty_done"])
40+
line["quantity"] = sum(move_lines.mapped("quantity"))
41+
line["to_consume_now"] = bool(line["quantity"])
4242
return line
4343

4444
def assign_quants(self):
@@ -53,18 +53,18 @@ 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
56+
ml.quantity = ml.reserved_uom_qty
5757
elif float_is_zero(
5858
ml.reserved_uom_qty, precision_digits=precision_digits
5959
):
6060
ml.unlink()
6161
else:
62-
ml.qty_done = 0.0
62+
ml.quantity = 0.0
6363
return res
6464

6565

6666
class AssignManualQuantsLines(models.TransientModel):
6767
_inherit = "assign.manual.quants.lines"
6868

6969
to_consume_now = fields.Boolean()
70-
qty_done = fields.Float(digits="Product Unit of Measure", readonly=True)
70+
quantity = fields.Float(digits="Product Unit of Measure", readonly=True)

mrp_production_quant_manual_assign/wizards/assign_manual_quants_view.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<field name="selected" position="after">
1414
<field
1515
name="to_consume_now"
16-
attrs="{'column_invisible': [('parent.is_production_single_lot', '=', False)]}"
16+
column_invisible="not parent.is_production_single_lot"
1717
/>
1818
</field>
1919
<field name="move_id" position="after">

0 commit comments

Comments
 (0)