在注册付款向导中,我添加了 2 个字段。我想根据“move_type”使字段不可见
如果 move_type == 'in_invoice' --> field1 : 不可见
如果 move_type == 'out_invoice' --> field2 : 不可见
<record id="view_account_payment_register_form_inherit_payment_test" model="ir.ui.view">
<field name="name">account.payment.register.form.inherit.payment.test</field>
<field name="model">account.payment.register</field>
<field name="inherit_id" ref="account.view_account_payment_register_form"/>
<field name="arch" type="xml">
<xpath expr="//group/field[@name='communication']" position="after">
<field name="field1"/>
<field name="field2"/>
</xpath>
</field>
</record>
我该怎么做 ?谢谢。