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

Is it possible to use the following?:

<field .. .. attrs="{'invisible': [('partner_id.name', '!=', False)]}">

The main question is: is the dot ('.') allowed?

We couldn't get it to work..

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

Well you could not get it works, because it does not. To make such things, you need to add fields on the current model (see fields.related)

الصورة الرمزية
إهمال
الكاتب

OK, you already gave an alternative solution! Thanks!

الكاتب

Why does a +domain+ allow the dot notation? and attrs not? Do you know why? Or where it is documented?

A related field in not set till you save. What happens if you've got a boolean and depending on the setting of the boolean you will be able to see certain fields.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
5615
2
يوليو 18
8076
1
مارس 15
12013
0
مارس 15
4521
2
سبتمبر 24
4426