flectra/addons/mrp/wizard/mrp_product_produce_views.xml
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

53 lines
3.1 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" groups="product.group_uom"/>
</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="produce_line_ids" attrs="{'invisible': [('produce_line_ids', '=', [])]}" nolabel="1" context="{'w_production': True, 'active_id': production_id, 'default_lot_id': lot_id}">
<tree editable="top" delete="0">
<field name="product_id" attrs="{'readonly': [('move_id', '!=', False)]}" domain="[('tracking', '!=', 'none'), ('id', '!=', parent.product_id)]" force_save="1"/>
<field name="lot_id" context="{'default_product_id': product_id}" domain="[('product_id', '=', product_id)]"/>
<field name="qty_to_consume" readonly="1"/>
<field name="qty_done"/>
<field name="product_uom_id" readonly="1" force_save="1" groups="product.group_uom"/>
<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>