跳至內容
選單
此問題已被標幟
1 回覆
20242 瀏覽次數

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

頭像
捨棄
最佳答案

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.


頭像
捨棄

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.

相關帖文 回覆 瀏覽次數 活動
1
3月 15
3758
0
2月 19
5736
3
9月 18
5608
2
2月 18
6906
0
2月 16
3688