Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2316 มุมมอง

 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>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Selecting items for one2many relation แก้ไขแล้ว
2
ธ.ค. 22
14796
1
พ.ย. 21
4919
0
ม.ค. 21
2276
8
พ.ค. 20
7804
0
ธ.ค. 23
2927