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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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)]}"/>
Thanks, but I got it already and did it by putting context on its action.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 7 25
|
465 | ||
|
0
thg 12 24
|
1091 | ||
|
1
thg 8 24
|
2345 | ||
|
2
thg 7 24
|
1585 | ||
|
1
thg 7 24
|
1168 |