我有一个选择字段和文本字段
'work': fields.selection([('tax', 'Tax Audit'), ('statutary',
'Statutary'), ('certificate', 'Certificate'), ('projection',
'Projections'), ('acount', 'Accounting'), ('others', 'Others'),
('roc', 'ROC Reg'), ('vat', 'VAT')], 'Nature Of Work'),
'details':fields.text('Details'),
<field name="work" select="0"/>
<field name="details" select="0"/>
详细信息字段必须仅在选择'roc'和'vat'时可见 我怎么能得到这个请帮帮我
答案 0 :(得分:3)
请尝试以下操作:
<field name="details" attrs="{'invisible':[('work','not in',['roc','vat'])]}"/>