跳至内容
菜单
此问题已终结
2 回复
7920 查看

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

形象
丢弃