feat(odoo): add lot mix operation and menu integration
This commit is contained in:
89
odoo/addons/mrp_lot_mix/views/mrp_lot_mix_views.xml
Normal file
89
odoo/addons/mrp_lot_mix/views/mrp_lot_mix_views.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_mrp_lot_mix_tree" model="ir.ui.view">
|
||||
<field name="name">mrp.lot.mix.tree</field>
|
||||
<field name="model">mrp.lot.mix</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="product_id"/>
|
||||
<field name="total_qty"/>
|
||||
<field name="destination_lot_id"/>
|
||||
<field name="state"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mrp_lot_mix_form" model="ir.ui.view">
|
||||
<field name="name">mrp.lot.mix.form</field>
|
||||
<field name="model">mrp.lot.mix</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Lot Mix">
|
||||
<header>
|
||||
<button name="action_confirm_mix" type="object" string="Confirm Mix" class="btn-primary" invisible="state != 'draft'"/>
|
||||
<button name="action_cancel" type="object" string="Cancel" invisible="state == 'done' or state == 'cancel'"/>
|
||||
<button name="action_set_draft" type="object" string="Reset to Draft" invisible="state != 'cancel'"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,done,cancel"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="date"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="product_id" readonly="state != 'draft'"/>
|
||||
<field name="uom_id" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="source_location_id" readonly="state != 'draft'"/>
|
||||
<field name="destination_location_id" readonly="state != 'draft'"/>
|
||||
<field name="destination_lot_id" readonly="state != 'draft'"/>
|
||||
<field name="total_qty" readonly="1"/>
|
||||
<field name="production_id" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<notebook>
|
||||
<page string="Components">
|
||||
<field name="source_line_ids" readonly="state != 'draft'">
|
||||
<list editable="bottom">
|
||||
<field name="lot_id"/>
|
||||
<field name="quantity"/>
|
||||
<field name="available_qty" readonly="1"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="note" placeholder="Reason, blending details, quality notes..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mrp_lot_mix" model="ir.actions.act_window">
|
||||
<field name="name">Lot Mix Operations</field>
|
||||
<field name="res_model">mrp.lot.mix</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
Create a lot-mix operation to consume multiple source lots/serials and produce a new lot/serial of the same product.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_mrp_lot_mix_root"
|
||||
name="Lot Mix"
|
||||
parent="mrp.menu_mrp_root"
|
||||
sequence="70"
|
||||
groups="mrp.group_mrp_user"/>
|
||||
|
||||
<menuitem id="menu_mrp_lot_mix"
|
||||
name="Mix Orders"
|
||||
parent="mrp.menu_mrp_manufacturing"
|
||||
action="action_mrp_lot_mix"
|
||||
sequence="10"
|
||||
groups="mrp.group_mrp_user"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user