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

I tried doing this:

<field name="allergy_verification" attrs="{'required': [('allergy_ids', '!=', [])]}" />

However if allergy_ids is blank, then allergy_verification is still marked as required. What am I doing wrong?

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

See https://github.com/odoo/odoo/issues/674

<field name="allergy_verification" attrs="{'required': [('allergy_ids', '!=', [[6, False, []]])]}" />
الصورة الرمزية
إهمال
الكاتب

Cool beans, thanks.

أفضل إجابة

Try the code:-

<field name="allergy_verification" attrs="{'required': [('allergy_ids', '!=', False)]}" />

الصورة الرمزية
إهمال