TIP: You can type at any time to perform a new search.
User roles
base_user_role · OCA/server-backend
- Repository
- OCA/server-backend · module folder · Try on Runboat
- Module version
- 1.0.2
- Category
- Tools
- Folder size
- 1.35 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-backend
- Last tracking update
- 2026-08-07 09:06:34
- Authors
- Odoo Community Association (OCA), ABF OSIELL
- Maintainers
- Odoo Community Association (OCA), ABF OSIELL
- Committers
- Víctor Martínez, Weblate, OCA-git-bot, oca-ci, Milan Topuzov, Johan Bjurstam
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- base_user_role_company, document_page_access_group_user_role
- Description
This module was written to extend the standard functionality regarding users and groups management. It helps creating well-defined user roles and associating them to users. It can become very hard to maintain a large number of user profiles over time, juggling with many technical groups. For this purpose, this module will help you to: > - define functional roles by aggregating low-level groups, > - set user accounts with the predefined roles (roles are cumulative), > - update groups of all relevant user accounts (all at once), > - ensure that user accounts will have the groups defined in their > roles (nothing more, nothing less). In other words, you can not set > groups manually on a user as long as there is roles configured on > it, > - activate/deactivate roles depending on the date (useful to plan > holidays, etc) > - get a quick overview of roles and the related user accounts. That way you make clear the different responsabilities within a company, and are able to add and update user accounts in a scalable and reliable way.
Code Analysis ⓘ
Views touched (9)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
create_from_user_wizard_view |
Create role from user | wizard.create.role.from.user | form | New |
group_groups_into_role_wiz_view |
wizard.groups.into.role.wiz.view | wizard.groups.into.role | form | New |
res_groups_view_form |
res.groups.form - base_user_role | res.groups | form | Inherits base.view_groups_form |
view_res_users_form_inherit |
res.users.form.inherit | res.users | form | Inherits base.view_users_form |
view_res_users_role_form |
res.users.role.form | res.users.role | form | New |
view_res_users_role_search |
res.users.role.search | res.users.role | search | New |
view_res_users_role_tree |
res.users.role.list | res.users.role | list | New |
view_res_users_search_inherit |
res.users.search.inherit | res.users | search | Inherits base.view_users_search |
view_res_users_tree_inherit |
res.users | tree | Inherits base.view_users_tree |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (6)
New fields (6)
-
parent_idsMany2many → res.groupshelp='Inverse relation for the Inherits field. The groups from which this group is inheriting'string='Parents' args: 'res.groups', 'res_groups_implied_rel', 'hid', 'gid' -
role_countIntegercompute='_compute_role_count' args: '# User Roles' -
role_idOne2many → res.users.rolecomodel_name='res.users.role'help='Relation for the groups that represents a role'inverse_name='group_id' -
role_idsMany2many → res.users.rolecomodel_name='res.users.role'compute='_compute_role_ids'help='Roles in which the group is involved'relation='res_groups_implied_roles_rel'string='User Roles' -
trans_parent_idsMany2many → res.groupscomodel_name='res.groups'compute='_compute_trans_parent_ids'recursive=Truestring='Parent Groups' -
view_accessMany2manygroups='base.group_system'
-
action_view_roles(self)
New fields (3)
-
role_idsOne2many → res.users.rolecomodel_name='res.users.role'compute='_compute_role_ids'compute_sudo=Truegroups='base.group_erp_manager'string='User Roles' -
role_line_idsOne2many → res.users.role.linecomodel_name='res.users.role.line'default=<expr>groups='base.group_erp_manager'inverse_name='user_id'string='Role lines' -
show_alertBooleancompute='_compute_show_alert'
-
create(self, vals_list)@api.model_create_multi -
set_groups_from_roles(self, force=False)Set (replace) the groups following the roles defined on users. If no role is defined on the user, its groups are let untouched unless the `force` parameter is `True`. -
write(self, vals)
New fields (9)
-
group_idMany2one → res.groupscomodel_name='res.groups'ondelete='cascade'readonly=Truerequired=Truestring='Associated group' -
group_privilege_idMany2onehelp='Privilege assigned to the associated group.'readonly=Falserelated='group_id.privilege_id'string='Associated privilege' -
is_defaultBooleanhelp='When enabled, this role is assigned to newly created users by default.'string='Default on new users' -
line_idsOne2many → res.users.role.linecomodel_name='res.users.role.line'inverse_name='role_id'string='Role lines' -
model_access_countIntegercompute='_compute_model_access_ids' -
model_access_idsMany2many → ir.model.accesscomodel_name='ir.model.access'compute='_compute_model_access_ids'required=Falsestring='Access Rights' -
role_user_idsOne2many → res.userscomodel_name='res.users'compute='_compute_role_user_ids'string='Users list' -
rule_idsMany2many → ir.rulecomodel_name='ir.rule'compute='_compute_rule_ids'required=Falsestring='Record Rules' -
rules_countIntegercompute='_compute_rule_ids'
-
copy(self, default=None) -
create(self, vals_list)@api.model_create_multi -
cron_update_users(self)@api.model -
read(self, fields=None, load='_classic_read') -
show_model_access_ids(self) -
show_rule_ids(self) -
unlink(self) -
update_users(self)Update all the users concerned by the roles identified by `ids`. -
write(self, vals)
New fields (6)
-
activeBooleanrelated='user_id.active' -
date_fromDateargs: 'From' -
date_toDateargs: 'To' -
is_enabledBooleancompute='_compute_is_enabled' args: 'Enabled' -
role_idMany2one → res.users.rolecomodel_name='res.users.role'ondelete='cascade'required=Truestring='Role' -
user_idMany2one → res.userscomodel_name='res.users'domain=[('id', '!=', SUPERUSER_ID)]ondelete='cascade'required=Truestring='User'
-
unlink(self)
New fields (2)
-
assign_to_userBooleandefault=True args: 'Assign to user' -
nameCharrequired=True
-
create_from_user(self)
New fields (1)
-
nameCharhelp='Group groups into a role and specify a name for this role'required=True
-
create_role(self)
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…