You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
1.8 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inheriting the product template to add the new field -->
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">
product.product.view.form.inherit.base.machine.repair.management
</field>
<field name="model">product.product</field>
<field name="inherit_id"
ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='detailed_type']" position="after">
<field name="is_machine"/>
<field name="is_machine_parts"/>
</xpath>
</field>
</record>
<!-- Machine views -->
<record id="action_machine" model="ir.actions.act_window">
<field name="name">Machines</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('is_machine','!=', False)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a machines
</p>
</field>
</record>
<!-- View for machine parts-->
<record id="action_machine_parts" model="ir.actions.act_window">
<field name="name">Machine Parts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_mode">kanban,tree,form</field>
<field name="domain">[('is_machine_parts','!=', False)]</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Machine Parts
</p>
</field>
</record>
</odoo>