I want to disable the sort property of a field in a tree view. Can anyone help me the way to do this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
Hi,
To disable sorting in a tree view, you can inherit Web.ListRender template and set null for required attributes.
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="custommodule_name.
<xpath expr="//t[@t-foreach='state.
<attribute name="t-on-click"/>
<attribute name="t-on-mouseenter"/>
<attribute name="t-on-mouseleave"/>
<attribute name="t-att-class"/>
</xpath>
</t>
</templates>
Hope it helps
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
0
4月 15
|
2911 | ||
|
1
7月 24
|
1086 | ||
|
2
5月 24
|
2166 | ||
|
1
2月 23
|
2398 | ||
|
4
11月 23
|
28414 |