Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

How to add new tab to module?

Subscribe

Get notified when there's activity on this post

This question has been flagged
purchasefieldscustomizationpurchase_order
14 Replies
50166 Views
Avatar
Maath

Hi,

My question is how to add new tab or (tabs) in my module or existing module

I know the we need to inherit the module we want to add some things and do our changes (As what I do previously (adding one2may & many2one fields))

see below picture will explain what I need

image description

Thank you in advance

5
Avatar
Discard
Avatar
Atul Makwana
Best Answer

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'>
	    		
	    	</page>
	    </xpath>
    </field>
</record>
8
Avatar
Discard
Bienvenido Villabroza

It didn't work for me initially in Odoo 13. I needed to edit this: expr="//page[@string='Personal Information']"

After changing @string to @name and then changing "Personal Information" to the proper name value of the page, it worked. Thanks Atul!

Atul Makwana

@Bienvenido Villabroza, yes you are correct, @sting is not working on the newer version. my above answer will perfectly in v8 or lower version

Abdelhameed Elnemr

what should i do if i want to show this tab only for the sales department

Avatar
Paramjitsingh Sahota (psa)
Best Answer

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

 <notebook>
     <page string="Your Tab1">
         <field name="..."/>
     </page>  
     <page string="Your Tab2">
         <field name="..."/>
     </page>   
 </notebook>
5
Avatar
Discard
Avatar
Indrabhan Bhamare
Best Answer

hello Math

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

Example.py

from openerp import fields, models, api, _

class class_name(models.Model):

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

Example.xml

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

</field>
</record>


5
Avatar
Discard
Avatar
Ghanshyam Prajapati
Best Answer

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

3
Avatar
Discard
Avatar
Andreas Maertens
Best Answer

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"?>
<openerp>
  <data>
    <!--
    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="..."/>
                </page>
            </notebook>
        </field>
    </record>

  </data>
</openerp>
3
Avatar
Discard
Maath
Author

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

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

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

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

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?

Avatar
khudrath
Best Answer

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

 

0
Avatar
Discard
Pascal Tremblay

I would want to know too!

Rihene

Put it the first not the last hhhh ;)

Avatar
Abdullah
Best Answer

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.
0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
edit due date after creating partial purchase order
purchase purchase_order
Avatar
0
मई 22
3391
Purchase prototype products; What´s your solution?
purchase purchase_order
Avatar
0
जुल॰ 24
2452
How to enable Source Document (field label) Origin (field name) Solved
purchase purchase_order
Avatar
Avatar
1
नव॰ 20
5226
Configuring Purchase Order Form and Report Solved
purchase purchase_order
Avatar
Avatar
1
अक्तू॰ 20
5736
Error: Field does not exists in odoo12
fields customization
Avatar
Avatar
1
जन॰ 20
5464
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now