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.
56 lines
2.4 KiB
56 lines
2.4 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!--This XML configuration modifies the product.template form view to
|
|
include warranty management fields.-->
|
|
<record id="product_template_form_view" model="ir.ui.view">
|
|
<field name="name">product.template.view.form.inherit.product.warranty.management.odoo</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//page[@name='sales']" position="after">
|
|
<page string="Warranty">
|
|
<group>
|
|
<group>
|
|
<field name="is_warranty_available" widget="bool_badge"/>
|
|
<field name="warranty_duration"
|
|
attrs="{'invisible': [('is_warranty_available', '=', False)]}"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
<record id="product_template_view_tree" model="ir.ui.view">
|
|
<field name="name">product.template.view.tree</field>
|
|
<field name="model">product.template</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name" string="Product"/>
|
|
<field name="warranty_duration"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="product_template_view_form" model="ir.ui.view">
|
|
<field name="name">product.template.view.form</field>
|
|
<field name="model">product.template</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<group>
|
|
<field name="name" string="Product:"/>
|
|
<field name="warranty_duration"/>
|
|
<field name="warranty_expiry"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="product_template_action" model="ir.actions.act_window">
|
|
<field name="name">Warranty Details</field>
|
|
<field name="res_model">product.template</field>
|
|
<field name="view_mode">tree,form</field>
|
|
<field name="view_ids" eval="[(5, 0, 0),
|
|
(0, 0, {'view_mode': 'tree', 'view_id': ref('product_template_view_tree')}),
|
|
(0, 0, {'view_mode': 'form', 'view_id': ref('product_template_view_form')})]"/>
|
|
</record>
|
|
</odoo>
|
|
|