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

Good day everyone,


I just want to ask how can I hide a field/column in a tree view of odoo 10 based on a condition or a boolean field value?


Thank you very much in advance.

아바타
취소
베스트 답변

To hide a field in a tree view in Odoo 10 based on a condition or a boolean field value, you can use the attrs attribute in your XML view definition. Here’s an example of how you can achieve this:

<field name="your_field_name" attrs="{'invisible': [('boolean_field_name', '=', False)]}"/>

If you want to hide the column, you can use 

<field name="your_field_name" attrs="{'column_invisible': [('boolean_field_name', '=', False)]}"/>



Hide column tree view | Odoo

아바타
취소
작성자 베스트 답변

Thanks, but I got it already and did it by putting context on its action.

아바타
취소
관련 게시물 답글 화면 활동
2
7월 25
465
0
12월 24
1091
1
8월 24
2345
2
7월 24
1585
1
7월 24
1168