我将 ssnid 和 sinid 设置为不可见字段。但两者仍然显示在我的视图中。似乎 XPath 位置存在问题。!
任何人都可以帮我整理一下吗?
<?xml version="1.0"?>
<openerp>
<data>
<!-- 1st part of the sim_view start -->
<record model="ir.ui.view" id="madulsima_plucker_form">
<field name="name">madulsima.plucker.form</field>
<field name="model">madulsima.plucker</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="type">form</field>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Madulsima Plucker Fields">
<field name="reg_no" />
<field name="worker_name" />
<xpath expr="/form/notebook/page/group/field[@name='ssnid']"
position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='sinid']"
position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
</page>
</notebook>
</field>
</record>
<record model="ir.actions.act_window" id="action_plucker_registration">
<field name="name">Plucker Registration</field>
<field name="res_model">madulsima.plucker</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>
<menuitem id="menu_madulsima_plucker" name="Madulsima/Checkroll" />
<menuitem id="menu_madulsima_plucker_registration" name="Plucker Registration"
parent="menu_madulsima_plucker" action="action_plucker_registration" />
</data>
</openerp>
我在 view.xml 中发布了我的整个代码