Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2041 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
dub 15
2913
1
čvc 24
1088
2
kvě 24
2176
1
úno 23
2402
4
lis 23
28422