Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7917 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

<field name="allergy_verification" attrs="{'required': [('allergy_ids', '!=', [[6, False, []]])]}" />
Ảnh đại diện
Huỷ bỏ
Tác giả

Cool beans, thanks.

Câu trả lời hay nhất

Try the code:-

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

Ảnh đại diện
Huỷ bỏ