I want to inherit the form view of product_temlpate in a new view "centre_view"
here is my.py file:
class centre(osv.osv):
_name = 'cvt.centre'
_description = '_Centre'
_inherit= 'product_template'
_columns = {
'name':fields.char('Nom_Centre', required=True)
}
and the xml file
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_centre_form">
<field name="name">centre.form</field>
<field name="model">cvt.centre</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<form string="Product">
<field name='name'/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_centre_tree">
<field name="name">centre.tree</field>
<field name="model">cvt.centre</field>
<field name="inherit_id" ref="product.product_template_tree_view"/>
<field name="arch" type="xml">
<tree string="Product">
<field name='name'/>
</tree>
</field>
</record>
<record model="ir.actions.act_window.view" id="action_centre_form">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_centre_form"/>
<field name="act_window_id" ref="action_my_model_template"/>
</record>
<record model="ir.actions.act_window.view" id="action_centre_tree">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_centre_tree"/>
<field name="act_window_id" ref="action_centre"/>
</record>
</data>
</openerp>
ParseError: "Invalid view definition Details of error : the field `warranty` doesn't existeso 'warranty' is in the parente view
what could be wrong please?why new view doesn't show??