Odoo Help

Welcome!

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.

0

How to add a button on a tree view?

By
Anirudh Lou
on 6/11/15, 2:33 AM 1,220 views

Hi to all, does any one know here how to add a button outside on a tree view? On the top of tree view i want to add button on it.


Thanks.

1
John Touba
On 6/11/15, 11:08 AM

It's better to add a button on your 'more' . Like this :

 <act_window id="Id" name="Name in the more"
src_model="model with the button" res_model="wizard called" view_type="form"

view_mode="form" key2="client_action_multi" target="new" />

<record id="id" model="ir.ui.view">

    <field name="name"Name</field>

    <field name="model">Wizard called</field>

    <field name="arch" type="xml">

        <form>

        </form> 

    </field>

</record>


0
Virali
On 6/11/15, 4:30 AM

Yes it is posible to add button in list view outside tree view but it will add button for all tree view.


<templates id="template" xml:space="preserve">

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

<t t-jquery="button.oe_list_add" t-operation="append">

<button class="oe_button oe_highlight"

type="button">Test</button>

</t>

</t>

</templates>

What about field? I mean, when a user is in tree view there is a selection field shown to him so that he can select on it before the tree is being populated.

Anirudh Lou
on 6/11/15, 4:45 AM

using wizard add selection options under "More" menu in List view. You can refer default sale module wizard code.

Prakash
on 6/11/15, 6:51 AM

Can you give me more explanation on how to do it? I really kindda lost on "....

Anirudh Lou
on 7/30/15, 3:35 AM

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

1 follower(s)

Stats

Asked: 6/11/15, 2:33 AM
Seen: 1220 times
Last updated: 6/11/15, 11:13 AM