Odoo Help


14 Answers

Atul Arvind India

--Atul Arvind--
| 4 3 7
Vadodara, India
--Atul Arvind--


I am Odoo Enthusiast/Developer from Vadodara, India. Working with Odoo from v5 to v11 and other opensource technology since 5+ years. Having Strong Expertise in

Odoo Development

Odoo Customization

Odoo Training

Odoo Integration

Server Administration

Odoo Migration


Here is my StackOverflow profile.  you can also find me on LinkedIn.

Contact: atul.surficle@gmail.com.

Atul Arvind India
7/23/15, 5:03 AM

To add page in employee after personal information tab you need to inherit the employee form view in xml like,

 <record id="view_employee_form" model="ir.ui.view">
   	<field name="name">hr.employee.form</field>
    <field name="model">hr.employee</field>
    <field name="inherit_id" ref="view_employee_form"/>
    <field name="arch" type="xml">
	    <xpath expr="//page[@string='Personal Information']" position='after'>
	    	<page string='My new tab'>
Indrabhan Bhamare India
7/23/15, 2:54 AM

hello Math

Here for you I'm adding new tab in "Quotations" of "sale" module,this is similar to your requirement


from openerp import fields, models, api, _

class class_name(models.Model):

    _inherit = 'sale.order'
    <fields name="..."/>


<record id="view_sale_order_tree" model="ir.ui.view">
<field name="name">view.sale.order.tree</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">

<xpath expr="//page[@string='Other Information']" position="after">
<page string="My_New_Tab">
<field name='My_new_fields'/>



In form view, inside <notebook> tag you can add as many pages(TAB) by this syntax

     <page string="Your Tab1">
         <field name="..."/>
     <page string="Your Tab2">
         <field name="..."/>

Andreas Maertens Germany

--Andreas Maertens--
| 6 6 9
Finsterwalde, Germany
--Andreas Maertens--

I develop odoo8.0 modules

Andreas Maertens Germany
5/30/13, 6:30 AM

You need to add a new page in the notebook in the View. Are you creating an own Addon/Module to alter the partner page?

In case of you do please take a look on that: You need to inherit from the partner view in maybe partner_view.xml:

<?xml version="1.0" encoding="utf-8"?>
    Partners Extension

    <record id="view_partner_property_form" model="ir.ui.view">
        <field name="name">res.partner.stock.property.form.inherit</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="product.view_partner_property_form"/>
        <field name="arch" type="xml">
            <notebook position="inside">
                <page string="My New Tab">
                    <field name="..."/>

Maath Iraq
5/30/13, 6:39 AM

What I do without inherit view (inherit the module) <!-- ============== student================= --> <!-- 1st part of the sim_view start--> <record model="ir.ui.view" id="student_form"> <field name="name">Student</field> <field name="model">sim77.student</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Student"> <field name="name"/> <field name="student_name"/>

<field name="gender"/> <field name="contract_id"/> </form> </field> </record> <!-- 1st part of the sim_view end--> can you help ? where I put code of new page?

Andreas Maertens Germany
5/30/13, 7:17 AM

Then add a notebook to your view. That looks exactly as above code just without the "inherit_id" tag nor the position attribute in <notebook>. Notebook adds the Space for your Tabs to the form.

Andreas Maertens Germany
5/30/13, 7:19 AM

You put the code of the new File in a separate .xml file. Then you need to add the .xml in your __openerp__.py under "update_xml". Just take a look to other addons therefor.

Andreas Maertens Germany
6/13/13, 4:01 AM

Did that solved your Problem? If it does please mark one of the correct answers to help others to find the solution faster

Cyrus Waithaka Kenya
9/15/14, 5:06 AM

Great, this works fine for me. I have a one2many field in the partner model that creates a relationship with custom model. How can I add a "Create" button to the tab so that it pop up the view of the custom model?


Ghanshyam Prajapati India

--Ghanshyam Prajapati--

| 4 4 10
Pune, India
--Ghanshyam Prajapati--
OpenERP Developer
Ghanshyam Prajapati India
5/30/13, 6:35 AM

inside <notebook> tag, after <page string="Personal Information"> </page> put your new tab, <page string="My Tab"> </page>

khudrath India
7/3/14, 3:02 AM

How can we set one tab or page as default, i.e., when i open the screen that that tab opens by default


La Page PT, Pascal Tremblay Canada
9/26/14, 7:51 AM

I would want to know too!

Rihene France
7/23/15, 8:19 AM

Put it the first not the last hhhh ;)


For adding a new tab your xpath had to be like this

<xpath expr="//page[2]" position='after'>
1,2,3 depending the number of your tab in the view.
Ask a Question
Keep Informed
1 follower(s)
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