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

Hello. I want to have my xpath customisations to take effect depending on the value of another boolean field. In other words, is it possible to show the default view of res.partner when a boolean is checked and the inherited and customised view when the boolean isn't checked. Every answer is appreciated, thank you.

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

Showing or hiding the fields based on this boolean field will help ? If yes, you can easily achieve it using attrs in Odoo.


Sample: attrs="{'invisible': [('state', '!=', ('option'))]}"

Video: Conditionally Hide Fields in Odoo


Thanks

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

I don't think I can as I've manipulated the default fields in the view too. I think putting attrs would just make them invisible, not the way they were as default.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 22
3468
2
أغسطس 19
20043
1
نوفمبر 24
1614
5
يوليو 24
92867
1
ديسمبر 23
3032