Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
7119 Prikazi

Hi,

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

Thanks

Avatar
Opusti
Best Answer

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

Avatar
Opusti
Best Answer

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.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jan. 25
1538
2
sep. 22
9281
2
apr. 22
4299
0
jul. 21
6963
1
mar. 21
4713