Help

17

How do you add a header in a tree view?

I want to add a header with buttons to a tree view. How can I do that?

The normal <header> tag does not work.

Can someone point me to a module that does this or give me an example of the XML i need to include?

Thanks

4 Comments
Avatar
Discard
Avatar
Mackie Gippets
-

I would also like to find out how to do this as well. When I insert <tree> inside <group> tag it still draws the elements as form and not as tree.

up voting a question you also want answered the the best way to promote it.

Avatar
Anuradha
-

@patently Didi you find any solution i also have same need

Avatar
Mohammed Amal N
-

I dont know if we can do it by xml. but you can do it by modifying listview.js

1 Answer
1
Best Answer

Hello @AJ,

1) If u want to place a button in tree view's header eg. beside Create Button then the below link can help:

https://supportuae.wordpress.com/2017/09/06/how-to-add-button-in-tree-view-header-near-create-and-import-buttons-odoo10/

2) If u want to place a button in tree view then below code can help:

<record id="view_categ_tree" model="ir.ui.view">

<field name="name">categ.tree</field>

<field name="model">categ</field>

<field name="arch" type="xml">

<tree string="Category" editable="bottom">

<button name="action_dosomething" string="Demo Button" type="object" class="btn-primary"/>

<field name="name" required="1"/>

</tree>

</field>

</record>

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard