Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2057 Представления

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 15
2916
1
июл. 24
1112
2
мая 24
2188
1
февр. 23
2413
4
нояб. 23
28449