Odoo Help


Add Button on top of tree view

Cavid Aslanov
on 9/24/13, 8:55 AM 1,711 views

Hi everyone i am new at openerp and i wanna ask that how can i add new button above tree view(not in tree row)? my code for tree view:

<record model="ir.ui.view" id="orders_tree_view"> <field name="name">Orders Tree View</field> <field name="model">cm.orders</field> <field name="arch" type="xml"> <tree string="Orders Tree"> <field name="no"/> <field name="status"/> <field name="Address"/> <field name="Date and Time"/> <field name="courier"/> <field type="Customer"/> </tree> </field> </record>

Odoo Developer
On 7/21/16, 11:27 PM


This is working in ODOO 9

<T t-extend = "ListView.buttons">

<T t-jquery = "button.oe_list_add" t-operation = "after">

<T t if = "widget.model == 'your.model'">

<Button class = "oe_button oe_list_add_planing_daily oe_highlight"

type = "button"> Create Planing Daily </ button>

<Button class = "oe_button oe_list_view_current_session oe_highlight"

type = "button"> Current Session </ button>

</ T>

</ T>

</ T>

i got it from https://www.odoo.com/forum/help-1/question/how-can-create-a-new-button-in-the-header-of-the-tree-view-after-the-create-button-or-import-104997

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

0 follower(s)


Asked: 9/24/13, 8:55 AM
Seen: 1711 times
Last updated: 7/21/16, 11:27 PM