|
本帖最后由 施程浩 于 2018-6-25 16:30 编辑
* 直接隐藏
<group name="owner" position="attributes">
<attribute name="invisible">1</attribute>
</group>
* 满足某些条件的隐藏
<xpath expr="//field[@name='parent_id']" position='attributes'>
<attribute name="attrs">{'invisible': [('passenger','=', True)]}</attribute>
</xpath>
<group col="4" string='旅客信息' attrs="{'invisible': [('supplier','=', True)]}"></group>
* 通过组来隐藏
<xpath expr="//field[@name='type']" position="attributes">
<attribute name="groups">base.group_no_one</attribute>
</xpath>
* 菜单的隐藏
<record model="ir.ui.menu" id="crm.menu_crm_opportunities">
<field eval="[(6,0, [ref('base.group_no_one'),])]" name="groups_id"/>
</record>
|
|