تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5676 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يناير 20
15521
16
أغسطس 19
10512
5
يونيو 18
11117
0
سبتمبر 17
2716
0
فبراير 17
3267