54 lines
2.9 KiB
XML
54 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_mrp_product_produce_wizard" model="ir.ui.view">
|
|
<field name="name">MRP Product Produce</field>
|
|
<field name="model">mrp.product.produce</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Produce">
|
|
<group>
|
|
<group>
|
|
<field name="serial" invisible="1"/>
|
|
<field name="production_id" invisible="1"/>
|
|
<field name="product_id" readonly="1"/>
|
|
<label for="product_qty"/>
|
|
<div class="o_row">
|
|
<field name="product_qty" attrs="{'readonly': [('serial', '=', True)]}"/>
|
|
<field name="product_uom_id" readonly="1"/>
|
|
</div>
|
|
<field name="product_tracking" invisible="1"/>
|
|
<field name="lot_id" attrs="{'invisible': [('product_tracking', '=', 'none')], 'required': [('product_tracking', '!=', 'none')]}" domain="[('product_id','=',product_id)]" context="{'default_product_id': product_id}"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="consume_line_ids" attrs="{'invisible': [('consume_line_ids', '=', [])]}" nolabel="1" context="{'w_production': True, 'active_id': production_id, 'default_lot_id': lot_id}">
|
|
<tree editable="top" delete="0" create="0">
|
|
<field name="product_id" readonly="1"/>
|
|
<field name="quantity" readonly="1"/>
|
|
<field name="plus_visible" invisible="1"/>
|
|
<field name="quantity_done"/>
|
|
<field name="lot_id" context="{'default_product_id': product_id}"/>
|
|
<field name="move_id" invisible="1"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<footer>
|
|
<button name="do_produce" type="object" string="Record Production" class="btn-primary"/>
|
|
<button string="Cancel" class="btn-default" special="cancel" />
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="act_mrp_product_produce" model="ir.actions.act_window">
|
|
<field name="name">Produce</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">mrp.product.produce</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="context">{}</field>
|
|
<field name="target">new</field>
|
|
</record>
|
|
|
|
</odoo>
|