Odoo Help

7
1 Answer
4
Tuan
7/20/16, 10:38 AM

you can try with the code above:


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

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

<t t-if="widget.model=='your.model'">

<button class="oe_button oe_list_add_planing_daily oe_highlight"

type="button">Create Planing Daily</button>

<button class="oe_button oe_list_view_current_session oe_highlight"

type="button">Current Session</button>

</t>

</t>

</t>


here I only add 2 buttons on tree list for "your.model"


hope it helps

3 Comments
Tarek Mohamed Ibrahim
7/21/16, 9:33 AM

I created a template, located it in static/src/xml/ folder, and assigned the template to the 'res.partern' model,

Now, how to link these two buttons with specific methods in the model??

Tuan
7/21/16, 10:21 AM

The code only work for the tree view (not for the tree on one2many field). If you do follow by the code, you will see 2 buttons appear next to "Create" or "Import" buttons for "your.model"

NIKHIL KRISHNAN
8/3/18, 2:46 AM

Thanks

Ask a Question
Writer
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now