Skip to Content
Menu
This question has been flagged
1 Reply
1950 Views

 How I add a button on header of tree view ?

Thanks in advance

Avatar
Discard
Best Answer

Hello 

Try with below code:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
    <t t-extend="ListView.buttons">
        <t t-jquery="button.oe_list_add" t-operation="after">
            <t t-if="widget.model == 'yourmodelname'">
                <button
                    class="oe_button oe_highlight"
                    type="button">My Button</button>
            </t>
        </t>
    </t>
</templates>

Avatar
Discard
Related Posts Replies Views Activity
0
Jul 24
193
2
Dec 22
12876
1
Nov 21
3148
0
Jan 21
1072
8
May 20
6255