python - 组的名称是什么?在 odoo 10
解决方案
如果我猜对了,您需要在用户表单中添加安全组。
如果是,那么这里是答案:
- 首先,您需要转到您的自定义模块。
创建名为“securtiy”的文件夹,并在该文件夹中创建“security.xml”
(名称不具体,如果您想更改文件名,则可以。)
添加以下代码:
<record id="group_module_name" model="res.groups"> <field name="name">group_name(any string you want)</field> <field name="category_id" ref="category_name"/> (This line is only for if you want to show group under specific category) <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> (Automatically checked this group that you specified in 'eval' after checked 'group_module_name' group.) </record>
参考链接:
https://github.com/odoo/odoo/blob/13.0/addons/account/security/account_security.xml
评论回复:
好的,那么这是您的参考图像中显示的用户弹出视图。 https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/views/res_users_views.xml#L117
通过这个属性看到这些组不会出现在弹出视图中,
odoo 使用的属性:attrs="{'invisible': [('id', '>', 0)]}"
根据您的需要进行更改。
推荐阅读
- android - 为什么 ViewPager 无限循环不起作用?
- string - 检查变量是否以冒号 `:` 开头
- metal - 金属深度测试不适用于多个绘制调用
- javascript - 如何遍历位于后端的整个数据
- dart - 是否可以创建实现或覆盖继承方法的 Dart 类扩展?
- python - Antlr4 for Python:将数据解析为部分
- python - Python 或 Powershell——读取 csv 并排序和收集要在电子邮件中发送的数据
- javascript - 子 Vue 组件数据未在第一页渲染时加载
- python - 如何将这些命令变成标准函数 - discord.py
- python - 在 Jupyter 笔记本中使用 SQLAlchemy 将数据帧写入 MySQL 数据库时出错