コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
7910 ビュー

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)]}" />

アバター
破棄