Odoo Help


how to Inherit the product form view

veena vasudevan
on 1/7/14, 6:16 AM 8,728 views

how to Inherit the product form view

Gopakumar N G
On 1/7/14, 6:47 AM

The following can be used to inherit the product form view.

<record id="product_normal_form_view1" model="ir.ui.view">
        <field name="name">product.product.form1</field>
        <field name="model">product.product</field>
        <field name="inherit_id" ref="product.product_normal_form_view" />
        <field name="type">form</field>
        <field name="arch" type="xml">
               <!-- CUSTOMIZATIONS -->
On 1/7/14, 6:55 AM

You need to get OpenERP guide for Developers

this in you python code i think should work fine

 class product_product(osv.osv):
_name = 'product.product'
_inherit = 'product.product'
_columns = {
    'your_field': fields.char('Your Field Name',size=50,select=True),
    'your_field_2': fields.date('Your Field 2 Name', size=50, required=False),          

this code in your xml should do it

<record model="ir.ui.view" id="view_product_product_form">
    <field name="name">product.product.form</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="product.product_normal_form_view"/>
    <field name="type">form</field>
    <field name="arch" type="xml">
        <field name="name" position="after">
                   <field name="your_field" select="0"/>           
        <field name="default_code" position="replace">
            <field name="your_field_2" />

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: 1/7/14, 6:16 AM
Seen: 8728 times
Last updated: 7/17/17, 12:47 PM