Odoo Help


how to inherit a form view in an other view?

on 12/15/15, 12:32 PM 545 views

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"?>



<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'/>




<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'/>




<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 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"/>




ParseError: "Invalid view definition

Details of error :
the field `warranty` doesn't existe

so 'warranty' is in the parente view

what could be wrong please?why new view doesn't show??

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/15/15, 12:32 PM
Seen: 545 times
Last updated: 12/15/15, 4:49 PM