콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2070 화면

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
2932
1
7월 24
1138
2
5월 24
2197
1
2월 23
2443
4
11월 23
28467