Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2026 Vues

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

Avatar
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Publications associées Réponses Vues Activité
0
avr. 15
2905
1
juil. 24
1085
2
mai 24
2161
1
févr. 23
2394
4
nov. 23
28409