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

Can I use the syntax as condition1.type1 and condition2.type1 in the field of view xml?
if condition1 and condition2 have the type1 attribute?

<field name="name" attrs="{'invisible': [('condition1.type1', '=', False)], 'required': [('condition2.type1', '=', True)]}"/>

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

Hello, if it's still problem. You can use context.


context="{'default_type_1': condition1.type1, 'default_type_2': condition2.type1}"
invisible="context.get('default_type_1', False)"
required="context.get('default_type_2')=='default_type_2_value'"
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أكتوبر 22
9198
1
مارس 15
11659
6
سبتمبر 17
7594
2
مارس 15
9509
1
مارس 15
3977