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

[FIX] mrp: close workorder form view on save


The workorder opening wizard view need a footer to be closed when
clicking on a button.

Task : 2278147

closes odoo/odoo#54364

Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent 350ed97c
No related branches found
No related tags found
No related merge requests found
......@@ -262,7 +262,7 @@
</field>
</page>
<page string="Operations" name="operations" groups="mrp.group_mrp_routings">
<field name="workorder_ids" attrs="{'readonly': [('state', 'in', ['cancel', 'done'])]}" context="{'tree_view_ref': 'mrp.mrp_production_workorder_tree_editable_view', 'default_production_id': id, 'default_product_uom_id': product_uom_id, 'default_consumption': consumption, 'default_company_id': company_id}"/> </page>
<field name="workorder_ids" attrs="{'readonly': [('state', 'in', ['cancel', 'done'])]}" context="{'tree_view_ref': 'mrp.mrp_production_workorder_tree_editable_view', 'form_view_ref': 'mrp.mrp_production_workorder_form_view_inherit', 'default_production_id': id, 'default_product_uom_id': product_uom_id, 'default_consumption': consumption, 'default_company_id': company_id}"/> </page>
<page string="By-Products" name="finished_products" groups="mrp.group_mrp_byproducts">
<field name="move_byproduct_ids" context="{'default_location_id': production_location_id, 'default_location_dest_id': location_src_id, 'default_state': 'draft', 'default_production_id': id, 'default_picking_type_id': picking_type_id, 'default_company_id': company_id}" attrs="{'readonly': ['|', ('state', '=', 'cancel'), '&amp;', ('state', '=', 'done'), ('is_locked', '=', True)]}">
<tree delete="0" default_order="is_done,sequence" decoration-muted="is_done" editable="bottom">
......
......@@ -130,7 +130,6 @@
<header>
<field name="state" widget="statusbar" statusbar_visible="pending,ready,progress,done"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
......@@ -198,11 +197,26 @@
<field name="operation_note" attrs="{'invisible': [('worksheet_type', '!=', 'text')]}"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="mrp_production_workorder_form_view_inherit_editable" model="ir.ui.view">
<field name="name">mrp.production.work.order.tree</field>
<field name="model">mrp.workorder</field>
<field name="mode">primary</field>
<field name="priority" eval="10"/>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="after">
<footer>
<button string="Save" special="save" class="btn-primary"/>
<button string="Discard" special="cancel"/>
</footer>
</xpath>
</field>
</record>
<record id="view_mrp_production_workorder_form_view_filter" model="ir.ui.view">
<field name="name">mrp.production.work.order.select</field>
<field name="model">mrp.workorder</field>
......@@ -443,7 +457,7 @@
<field name="res_model">mrp.workorder</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="view_id" ref="mrp_production_workorder_form_view_inherit"/>
<field name="view_id" ref="mrp_production_workorder_form_view_inherit_editable"/>
</record>
<record model="ir.actions.act_window" id="mrp_workorder_todo">
......
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