在向用户组提供访问权限时,它显示错误:
"Exception: Module loading registration_form failed: file registration_form/security/ir.model.access.csv could not be processed: No matching record found for external id 'model_registration_management' in field 'Object' No matching record found for external id 'registration.group_management_user' in field 'Group' Missing required value for the field 'Object' (model_id) - - - Missing required value for the field 'Object' ("
这是安全文件夹中的security.xml
文件
<record model="ir.module.category"
id="module_category_management">
<field name="name">Management</field>
<field name="sequence">3</field>
</record>
<record id="group_management_user" model="res.groups">
<field name="name">user</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
<field name="category_id" ref="module_category_management"/>
</record>
csv 文件中的访问权限代码
access_registration_management,registration.management,
model_registration_management,
registration.group_management_user,1,1,1,1
我需要它为我创建一个用户组,但它显示错误。
最佳答案
当您的模块中没有模型 model_registration_management 时,通常会发生此错误。请确保在模块和 xml 文件中正确定义模型。 有类似问题可以引用this link
关于python - 如何给用户组授予访问权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56791289/