跳至內容
選單
此問題已被標幟
1 回覆
2332 瀏覽次數

 How I add a button on header of tree view ?

Thanks in advance

頭像
捨棄
最佳答案

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>

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
12月 22
14801
1
11月 21
4928
0
1月 21
2279
8
5月 20
7812
0
12月 23
2931