Odoo Many2many 值判断

最近在做业务的时候有一个这样的需求,客户选择了某一个m2m值的时候可以填写相应的字段,若未选则不显示。

参考资料:Changing attrs based on an empty many2many relation

<group>
    <field name="power_ids" widget="many2many_tags"/>
    <field name="power_char" attrs="{'invisible':[('power_ids','not in', [(6, False, [1])])]}"/>
</group>

There are no comment yet.

HTML tag cannot be used in this comment.