Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
20222 Lượt xem

I make some fields to save in it my data and make some other fields as boolean to make condition by it fields 

for example if f_bool1 is false i want to invisible f1 from tree view how can I make it .

thank you so much

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In your case on the tree view you need to add attributes to the field. Try with

<filed name="f1" attrs="{'invisible':[('f_bool1','=',false)]}"/> 

Should works.


Ảnh đại diện
Huỷ bỏ

In Tree view does it hide complete column when we use attrs="{'invisible':[('f_bool1', '=', false)]}", I found it only hides the data/content in that column. So I tried to using invisible="context.get('f_bool1') = false" instead of above one. It hides the complete column in Tree view. I hope it will help you.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
3732
0
thg 2 19
5721
3
thg 9 18
5594
2
thg 2 18
6894
0
thg 2 16
3676