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

i want to display a customized field "wilaya" depending the value of another field "country_id" in the view base.view_partner_form

my code is : 

                <field name="wilaya" attrs="{'invisible': [('country_id','!=', 'Algeria')] }"/>

but the condition doesn't work. need help please
อวตาร
ละทิ้ง

How to visible and invisible fields in odoo

https://goo.gl/BCxCpk

คำตอบที่ดีที่สุด

Hello Kader,

<field name="wilaya" attrs="{'invisible': [('country_id','!=',record_id)] }"/>

record_id = Database id then it will work

อวตาร
ละทิ้ง
ผู้เขียน

very helpful thx very much it's working

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 20
15232
16
ส.ค. 19
10198
5
มิ.ย. 18
10844
0
ก.ย. 17
2484
0
ก.พ. 17
3004