Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7202 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 25
1720
2
ก.ย. 22
9451
2
เม.ย. 22
4481
0
ก.ค. 21
7158
1
มี.ค. 21
4875