Odoo Help


creating a new model from an existing one, adding new information to the copy but leaving the original module as-is

Vale Trood
on 8/3/15, 7:38 AM 533 views

Hello guys!!

Please, i work with the inheritance procedure.

I want to create a new model from an existing one, add new information to the copy but leaving the original module as-is.

So i use in my python:

_name = New

_inherit = obj1, ...

The problem is that i dont know what to put in my XML.

Here is my example:

<record id="view_hr_form_inherit" model="ir.ui.view">

<field name="name">hr.hr.employee.form.inherit</field>

<field name="model">hr.employee</field>

<field name="inherit_id" ref="hr.view_employee_form"/>

<field name="arch" type="xml">

Who can help please.

Thanks and Regards.

On 8/3/15, 8:07 AM

Firstly if you inherit and give _name attribute with some different name then in your XML you need not to inherit view by giving inherit id.

You need to simply create view but in this you can access all field of inherit view.

<record id="view_hr_form" model="ir.ui.view">

<field name="name">new model name</field>

<field name="model">model name<field>

 <field name="arch" type="xml">

      <field name=field name"/>




Hope this will help you.

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: 8/3/15, 7:38 AM
Seen: 533 times
Last updated: 8/3/15, 8:07 AM