Skip to content
Snippets Groups Projects
Commit cbcdac46 authored by William Henrotin's avatar William Henrotin
Browse files

[FIX] mrp: send correct id via context


On the manufacturing order form view, the 'update' button to change
the production quantity doesn't give the current mo id to the wizard.
That means 'active_id' is used.
The issue is 'active_id' may refer to another object (a bom or
a workcenter for instance).

This commit fills the default_mo_id key in the context before calling the wizard
to ensure the correct production order is used in the wizard default get.

Task : 2043136

closes odoo/odoo#35453

Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent c361c377
No related branches found
No related tags found
No related merge requests found
......@@ -99,6 +99,7 @@
<field name="product_uom_id" options="{'no_open':True,'no_create':True}" force_save="1" groups="uom.group_uom" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
<button type="action"
name="%(mrp.action_change_production_qty)d"
context="{'default_mo_id': id}"
string="Update" class="oe_link" attrs="{'invisible': ['|', ('state', 'in', ('draft', 'done','cancel')), ('id', '=', False)]}"/>
</div>
<field name="bom_id"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment