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

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"

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 24
1868
1
ก.พ. 17
5580
1
มี.ค. 15
4238
1
มี.ค. 15
16044
0
ม.ค. 20
3601