1
我想隐藏基于用户组的编辑按钮。但是我不想编辑ir.model.access.csv,因为我的系统流程中的某些进程必须能够通过代码编写模型的某个用户组。Odoo如何隐藏基于用户组的编辑按钮?
是否有某种方法可以隐藏某些用户组的编辑按钮?
我想隐藏基于用户组的编辑按钮。但是我不想编辑ir.model.access.csv,因为我的系统流程中的某些进程必须能够通过代码编写模型的某个用户组。Odoo如何隐藏基于用户组的编辑按钮?
是否有某种方法可以隐藏某些用户组的编辑按钮?
我自己找到答案。我刚才添加的属性继承视图,如下面的代码:
<record model="ir.ui.view">
<field name="name">edit_button</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="groups_id" eval="[(4,ref('wongnai_flow.group_edit')),(4, ref('wongnai_flow.group_cs')),(4, ref('wongnai_flow.group_ae')),(4, ref('wongnai_flow.group_csm'))]"/>
<field name="arch" type="xml">
<xpath expr="/form" position="attributes">
<attribute name="create">false</attribute>
<attribute name="edit">false</attribute>
</xpath>
</field>
</record>
嘿,你必须在'ir.model.access.csv' –
添加新行有没有其他解决办法 –
,而你没有担心,在这一行中,您只需为此组添加访问渗透 –