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

Hi,

I want to hide field from one2many fields(tree view) based on parent view field value, how can i do this?

Thanks

頭像
捨棄
最佳答案

Hi
Please refer the code given below,

<field name="field_name" attrs="{'column_invisible': [('parent.parent_field_name,'=',False)]}"/>
// Single condition
<field name="field_name" attrs="{'column_invisible': (['|', ('parent.parent_field_name_1','=', condition), ('parent.parent_field_name_2', '=',condition)])}"/>
//Multiple condition

Regards

頭像
捨棄
最佳答案

Having same issue.It doesn't seem possible to me. You need to create another form view. or probably field_view_arch can do job but even if it can do , I would prefer to write another view.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
1月 25
1135
2
9月 22
8960
2
4月 22
3797
0
7月 21
6631
1
3月 21
4493