Files
odoo_source/addons/mrp/wizard/mrp_production_split.xml
T
JF Aubert 6acfb2e630 [IMP] mrp : split / merge manufacturing orders
Split a manufacturing order in several parts
using the back order mechanism

Merge several manufacturing orders related to the same product/bom
by cancelling all of them and creating a new one

closes odoo/odoo#82427

Task: 2662566
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-01 18:06:50 +00:00

81 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_mrp_production_split_multi_form" model="ir.ui.view">
<field name="name">mrp.production.split.multi.form</field>
<field name="model">mrp.production.split.multi</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Split Productions">
<field name="production_ids">
<tree create="0" editable="top">
<field name="production_id"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom_id"/>
<button name="action_prepare_split" type="object" icon="fa-scissors" width="0.1" title="Split Production"/>
</tree>
</field>
<footer>
<button string="Discard" class="btn-secondary" special="cancel" data-hotkey="z"/>
</footer>
</form>
</field>
</record>
<record id="view_mrp_production_split_form" model="ir.ui.view">
<field name="name">Split Production</field>
<field name="model">mrp.production.split</field>
<field name="arch" type="xml">
<form string="Split Production">
<group>
<group>
<field name="production_id" readonly="1"/>
</group>
<group>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom_id"/>
</group>
<group>
<field name="counter"/>
</group>
</group>
<field name="production_detailed_vals_ids" attrs="{'invisible': [('counter', '=', 0)]}">
<tree editable="top">
<field name="quantity"/>
<field name="user_id"/>
<field name="date"/>
</tree>
</field>
<field name="production_split_multi_id" invisible="1"/>
<field name="valid_details" invisible="1"/>
<footer>
<button string="Split" class="btn-primary" type="object" name="action_split" data-hotkey="q" attrs="{'invisible': [('valid_details', '=', False)]}"/>
<button string="Discard" class="btn-secondary" special="cancel" data-hotkey="z" attrs="{'invisible': [('production_split_multi_id', '!=', False)]}"/>
<button string="Discard" class="btn-secondary" type="object" name="action_return_to_list" data-hotkey="z" attrs="{'invisible': [('production_split_multi_id', '=', False)]}"/>
</footer>
</form>
</field>
</record>
<record id="action_mrp_production_split_multi" model="ir.actions.act_window">
<field name="name">Split productions</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.production.split.multi</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="action_mrp_production_split" model="ir.actions.act_window">
<field name="name">Split production</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">mrp.production.split</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</odoo>