我正在使用odoo 11,我想设置一个默认过滤器,按员工分组。我对模块进行了修改,但显示的结果不正确(我想删除管理员过滤器)。我不知道出了什么问题。有任何帮助的想法吗?
<record id="action_bt_overtime_management" model="ir.actions.act_window">
<field name="name">Overtime</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">bt.hr.overtime</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'search_default_employee_id':1}</field>
<field name="search_view_id" ref="bt_overtime_management_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Overtime Request
</p>
</field>
</record>
答案 0 :(得分:2)
尝试这样给
<record id="action_bt_overtime_management" model="ir.actions.act_window">
<field name="name">Overtime</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">bt.hr.overtime</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{'group_by':'employee_id'}</field>
<field name="search_view_id" ref="bt_overtime_management_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Create Overtime Request
</p>
</field>
</record>