I need to create a dropdown button like this in each line of a tree view.
I created a button in form view like this https://i.imgur.com/ku588Fv.png and the code to this is:
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
But this doesn't work in tree view, inside <tree> </tree>, just inside <form></form>
Does anyone knows why is that, and how can i create my dropdown button in tree view?
Thanks
You might have created dropdown only in Formview. For tree view there is a separate template.
i know, i did it in tree view like this:
<record model="ir.ui.view" id="process_tree">
<field name="name">Processos</field>
<field name="model">pld.process</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="type"/>
<field name="stage_id"/>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Dropdown button</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
</tree>
</field>
</record>
But i get an error saying "Invalid View Definition"