TIP: You can type at any time to perform a new search.
User profiles
base_user_role_profile · OCA/server-backend
- Repository
- OCA/server-backend · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Tools
- Folder size
- 0.08 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-backend
- Last tracking update
- 2026-08-07 08:43:03
- Authors
- Akretion, Odoo Community Association (OCA)
- Maintainers
- Akretion, Odoo Community Association (OCA)
- Committers
- Weblate, Florian Mounier, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Extending the base_user_role module, this one adds the notion of profiles. Effectively profiles act as an additional filter to how the roles are used. This allows users to switch their permission groups dynamically. This can be useful for example to: - finer grain control on menu and model permissions (with record rules this becomes very flexible) - break down complicated menus into simpler ones - easily restrict users accidentally editing or creating records in O2M fields and in general misusing the interface, instead of excessively explaining things to them When you define a role, you have the possibility to link it to a profile. Roles are applied to users in the following way: - Apply user's roles without profiles in any case - Apply user's roles that are linked to the currently selected profile In addition you can: - Add a 'no profile' profile to the user's choice of profile, to allow him to select a specific profile which enables only the roles without a profile. - Restrict the user to change its profile, which can be useful in a security emergency.
Code Analysis ⓘ
Views touched (6)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_res_users_form_inherit |
res.users.role.form.inherit | res.users.role | form | Inherits base_user_role.view_res_users_role_form |
view_res_users_form_inherit_profile |
res.users.form.inherit | res.users | form | Inherits base.view_users_form |
view_res_users_profile_form |
res.users.profile.form | res.users.profile | form | New |
view_res_users_profile_tree |
res.users.profile.list | res.users.profile | list | New |
view_res_users_role_search |
res.users.role.search | res.users.role | search | Inherits base_user_role.view_res_users_role_search |
view_res_users_role_tree |
res.users.role.list | res.users.role | list | Inherits base_user_role.view_res_users_role_tree |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (5)
New fields (0)
No new fields.
Public methods (1)-
session_info(self)
New fields (4)
-
include_default_profileBooleanhelp="If enabled, the default profile ('no profile') will be added to the user's allowed profiles. This allows the user to select a profile that activates only the roles not associated with any specific profile." -
profile_idMany2one → res.users.profiledefault=<expr> args: 'res.users.profile', 'Current profile' -
profile_idsMany2many → res.users.profilestring='Currently allowed profiles' args: 'res.users.profile' -
restrict_profile_switchingBooleanhelp='If enabled, the user will be prevented from changing their profile. This acts as a security measure to lock users into their current profile.'
-
action_profile_change(self, vals) -
create(self, vals_list)@api.model_create_multi -
write(self, vals)
New fields (3)
-
nameChar -
role_idsOne2many → res.users.rolestring='Roles' args: 'res.users.role', 'profile_id' -
user_idsMany2many → res.userscompute='_compute_user_ids'string='Allowed users' args: 'res.users'
No public methods.
New fields (1)
-
profile_idMany2one → res.users.profileargs: 'res.users.profile', 'Profile'
-
write(self, vals)
New fields (1)
-
profile_idMany2onerelated='role_id.profile_id'
No public methods.
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- green — ready to merge
- Open since
- 147 days ago
- Last activity
- 4 days ago
- Repository
- OCA/server-backend
- Pull request
- [19.0][MIG] base_user_role_profile: Migration to v19 (#442)