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

Hi, I'm using Odoo16,

How to add a new button after the current Create button in the tree view (list view)..?


Any help, source, or tutorial on how to achieve that will be very appreciated.


Thanks,

Tri

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

<templates>

<!-- Adding gear icon near breadcrumb action menu button -->

<t t-name="custom_list_views" t-inherit="web.Breadcrumb.Actions" t-inherit-mode="extension">

<!-- Path to add button near action button in list renderer -->

<xpath

expr="//div[contains(@class, 'o_control_panel_breadcrumbs_actions')]" position="before">

<div class="btn-group hidden-xs o_dropdown gear_btn">

<button id="select_column_button"

class="o_list_buttons btn btn-primary fa fa-gear o_list_icon"

style="line-height: inherit; margin-right: 7px;"

aria-expanded="false">

<i class="fa fa-caret-down custom-space"></i>

</button>

<ul id="show-menu"

class="dropdown-menu o_group_by_menu oe_dropdown_menu">

</ul>

</div>

</xpath>

</t>

<templates>


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

Please refer to the blog: https://www.cybrosys.com/blog/how-to-add-a-create-button-near-tree-and-kanban-view-in-odoo-16


Hope it helps.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, you can follow this: https://youtu.be/mcDKP-4-4-E

hope it helps

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I found this thread in odoo community. it's shows how to create another button beside "New" button. But it require javascript knowledge

odoo.com/id_ID/forum/help-1/odoo-16-add-custom-button-next-to-create-button-in-tree-view-229215




อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

For adding  button in the header of tree view, inside the xml file, inside the header tag, it is allowed to define the button as we currently do in form view.

See:  https://www.youtube.com/watch?v=DTU8Y2Jtw0U

Thanks

อวตาร
ละทิ้ง
ผู้เขียน

Thank you Niyas,
Will this work in Odoo 16?

That video shows how to make another button besides "New" button. But it will only show when data is selected. My case is, I need to make another button (or action) that will always show in tree view. I will give the answer when I found it

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 24
1813
2
ก.ค. 24
4987
0
ม.ค. 24
1613
1
พ.ย. 24
2789
1
ต.ค. 23
2201