跳至内容
菜单
此问题已终结
2 回复
1111 查看

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
330
0
12月 24
984
1
8月 24
2232
2
7月 24
1495
1
7月 24
1073