我想隐藏基于用户组的编辑,创建和删除按钮。您可以编辑ir.model.access.csv 我尝试了所有道路,但没有成功:
n°1:
hr.access_hr_department_user, hr.department.user, model_hr_Department, hr.group_hr_user, 1,0,0,0
n°2:
<record model="ir.ui.view" id="view_hr_department_form_groups_section">
<field name="name">edit_button</field>
<field name="model">hr.department</field>
<field name="inherit_id" ref="hr.view_department_form"/>
<field name="groups_id" eval="[(4,ref('security_groups.group_supervisor_department') )]"/>
<field name="arch" type="xml">
<xpath expr="/form" position="attributes">
<attribute name="create">false</attribute>
<attribute name="edit">false</attribute>
</xpath>
</field>
</record>
所有组的解决方案N°2隐藏按钮
n°3:
<record model="ir.ui.view" id="view_hr_department_form_groups_section">
<field name="name">edit_button</field>
<field name="model">hr.department</field>
<field name="inherit_id" ref="hr.view_department_form"/>
<field name="groups_id" eval="[(4,ref('security_groups.group_supervisor_department') )]"/>
<field name="arch" type="xml">
<form create= 'false' editable ='false' >
</form>
</field>
</record>
答案 0 :(得分:0)
我会选择1号。
要使其正常工作:
如果它不起作用,请共享ir.model.access.csv