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

can i add button to tree view ?

Subscribe

Get notified when there's activity on this post

This question has been flagged
v7treebutton
4 Replies
80180 Views
Avatar
Elmasry

Hi, All

simply i want to add a button on hr employee tree view but i cant do it .. i tried to add it through header tag but seem it is not available.

anyone can help me please?!!

This is my code

<record id="view_employee_tree" model="ir.ui.view">
            <field name="name">hr.employee.tree</field>
            <field name="model">hr.employee</field>
            <field name="arch" type="xml">
                <tree string="Employees">
                    <header>
                    <button name="confirm" string="Confirm" class="oe_highlight"/>
                    </header>
                    <field name="name"/>
                    <field name="work_phone"/>
                    <field name="work_email"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="department_id"/>
                    <field name="job_id"/>
                    <field name="parent_id"/>
                    <field name="coach_id" invisible="1"/>
                </tree>
            </field>      
        </record>

Error is : ... ERROR database openerp.addons.base.ir.ir_ui_view: <string>:1:0:ERROR:RELAXNGV:RELAXNG_ERR_ELEMWRONG: Did not expect element header there ... ERROR database openerp.addons.base.ir.ir_ui_view: <string>:2:0:ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element tree has extra content: header

Thanks in advance.

3
Avatar
Discard
Avatar
Francesco OpenCode
Best Answer

Tree view hasn't header section. Insert the button like a normal field.

<record id="view_employee_tree" model="ir.ui.view">
            <field name="name">hr.employee.tree</field>
            <field name="model">hr.employee</field>
            <field name="arch" type="xml">
                <tree string="Employees">
                    <button name="confirm" string="Confirm" class="oe_highlight"/>
                    <field name="name"/>
                    <field name="work_phone"/>
                    <field name="work_email"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="department_id"/>
                    <field name="job_id"/>
                    <field name="parent_id"/>
                    <field name="coach_id" invisible="1"/>
                </tree>
            </field>      
        </record>
1
Avatar
Discard
Elmasry
Author

thank you very much Francesco it is work now

but didn't give me the result that i want

i want to add this button out of the tree grid like from view . but what actually happened that the button repeated with every row of data .

have you any advice for me.

Pierre Soum

Yes the tree view is often missing and would be a GREAT fonctionnality...

Elmasry
Author

But what can i do to add button above or under tree view???

Francesco OpenCode

If you create a wizard that call the some function of the button, you can find a menu voice in the "Other" menu at top of tree that does what you want!

Elmasry
Author

could you explain more ? please francesco

Francesco OpenCode

Create a wizard, insert in it a button similar to button you want "copy". In tree you can select the record that you want confirm, go to Other menu and select the wizard you have created. Click on the button in wizard (your button) and it confirm the records

Elmasry
Author

i did what as you told me and write the code to create wizard and add the button to it

but what is "Other" menu .. do you mean "More" menu if u mean "More " so i can't find it's code sorry Francesco but i really need it.

thanks for helping me your answer helped me but hope more :)

Francesco OpenCode

Excuse me but I'm italian and I use italian location in my db so I sometimes forgot original name of Menu...:)....Do you know how to create an openerp module?

Elmasry
Author

yes i can

Francesco OpenCode

Ok, so isn't difficult to create a wizard. In this wizard you insert a button that calla a funtion egual to function called by confirm button. It's all.

Elmasry
Author

thx Francesco :)

evon_dun

want to know about a button on invoice view when we select few records to get reports printed, can we have a button there to call a function and then select invoices to print?

Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

In the latest versions, it can be easily achieved as we do in form.

See:  https://www.youtube.com/watch?v=R8eG6uOxHKw

Thanks

0
Avatar
Discard
Avatar
Carlos Manuel Alvarez López
Best Answer

Elmasry Hi, I have the same problem as you, perhaps a little later, but let me know if you solved your problem

0
Avatar
Discard
Avatar
Diego Calzadilla
Best Answer

Maybe it's too late but you should try something likes this:

       <form string="Product form view" version="7.0">
               <!--   <field name="qtty"/>-->
                <field name="products" widget='many2many_list' context="{'tree_view_ref':'_new_tree.product_product_tree'}">
                    <tree string="Products" >
                <!-- <field name="default_code"/>-->
                <field name="name"/>
               <!--  <field name="categ_id" invisible="1"/>
                <field name="type" invisible="1"/>
                <field name="variants" groups="product.group_product_variant"/>
                <field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>-->
                <field name="qtty"/>
               <field name="qty_available"/>
                <field name="virtual_available"/>
                <field name="lst_price"/>
                <field name="price" invisible="not context.get('pricelist',False)"/>
                <field name="standard_price" invisible="1"/>
                <field name="state"/>
                <field name="company_id" groups="base.group_multi_company" invisible="1"/>
            </tree> 
                </field>
                <footer>
                    <button string="Cancel" class="oe_link" special="cancel"/>
                     or
                    <button name="make_order" type="object" string="Generate Order" class="oe_highlight"/>
                </footer>

It's just a tree inside a form , after the tree you add the buttons!!

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
Button not clickable in list view
v7 tree button clickable
Avatar
Avatar
1
दिस॰ 19
12837
[v7] oe_highlight in treeview
v7 tree button oe_highlight
Avatar
Avatar
1
मार्च 15
5805
How to create a button for every row in view tree
treeview tree button
Avatar
Avatar
1
सित॰ 18
11672
Download binary button
form v7 button
Avatar
0
मार्च 15
4633
Button in tree view as image.
image tree button
Avatar
0
मार्च 15
4133
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • 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