<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="mrp_subproduct_view" model="ir.ui.view">
            <field name="name">mrp.bom.sub.product</field>
            <field name="model">mrp.bom</field>
            <field name="inherit_id" ref="mrp.mrp_bom_form_view"/>
            <field name="arch" type="xml">
             <notebook position="inside">
                 <page string="Byproducts" position="inside">
                     <field name="sub_products">
                         <tree string="Byproducts"  editable="top">
                             <field name="product_id" on_change="onchange_product_id(product_id)"/>
                             <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
                             <field name="product_qty"/>
                             <field name="subproduct_type"/>
                         </tree>
                         <form string="Byproducts">
                             <field name="product_id" on_change="onchange_product_id(product_id)"/>
                             <field name="product_uom" on_change="onchange_uom(product_id, product_uom)" groups="product.group_uom"/>
                             <field name="product_qty"/>
                             <field name="subproduct_type"/>
                         </form>
                    </field>
                </page>
            </notebook>
            </field>
        </record>
  </data>
</openerp>
