Odoo Help


This community 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.


Add Button on top of tree view

Cavid Aslanov
on 9/24/13, 8:55 AM 820 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>

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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