I have a checkbox in Manufacturing module-> Products form (Named "Raw Materials")
If I select the checkbox and save the data it should not get saved in the products form but else it should be saved in a separate menu called Raw materials which I created manually in Manufacturing module.
How to achieve this in Odoo v10?
This is my xml file......
<record id="raw_materials" model="ir.ui.view">
<field name="name">raw.form.inherit.button</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="arch" type="xml" >
<xpath expr="//field[@name='name']" position="after">
<div name="options" groups="base.group_user">
<div>
<field name="raw"/>
<label for="raw"/>
</div>
</div>
</xpath>
</field>
</record>
<record id="product_template_view" model="ir.ui.view">
<field name="name">product.template.search</field>
<field name="model">product.template</field>
<field name="arch" type="xml">
<search string="Product">
<separator/>
<filter string="Raw Materials" name="filter_to_raw" domain="[('raw','=',True)]"/>
<separator/>
</search>
</field>
</record>
<record id="product_raw_materials" model="ir.actions.act_window">
<field name="name">Raw Materials</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_type">form</field>
<field name="context">{"search_default_filter_to_raw":1}</field>
<field name="view_id" ref="product.product_template_kanban_view"/>
<field name="search_view_id" ref="product.product_template_search_view"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to define a new product.
</p><p>
You must define a product for everything you sell, whether it's
a physical product, a consumable or a service you offer to
customers.
</p><p>
The product form contains information to simplify the Raw Materials: price, notes in the quotation, accounting data,
procurement methods, etc.
</p>
</field>
</record>
<menuitem id="menu_mrp_product_form" name="Raw Materials" action="mrp.product_template_action"
parent="mrp.menu_mrp_bom" sequence="8"/>
Thanks in advance