コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2023 ビュー

I want to disable the sort property of a field in a tree view. Can anyone help me the way to do this?

アバター
破棄
最善の回答

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.ListRenderer" t-inherit="web.ListRenderer" t-inherit- mode="extension" owl="1">
<xpath expr="//t[@t-foreach='state.columns']//th" position="attributes">
             <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
2904
1
7月 24
1083
2
5月 24
2160
1
2月 23
2391
4
11月 23
28409