TIP: You can type at any time to perform a new search.
User roles by company
base_user_role_company · OCA/server-backend
- Repository
- OCA/server-backend · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Tools
- Folder size
- 0.05 MB
- License
- AGPL-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), Open Source Integrators
- Maintainers
- dreispt
- Committers
- OCA-git-bot, oca-ci, Clément Gouin
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Enable User Roles depending on the Companies selected. A company specific Role will only be enabled if it is set for **all** the currently selected companies. For example, if a user is "Sales Manager" only for Company A, it will see that role enabled only if Company A is selected. If the user selects Company A and Company B, then the "Sales Manager" role won't be enabled.
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_res_users_form_inherit |
res.users.form.inherit | res.users | form | Inherits base_user_role.view_res_users_form_inherit |
view_res_users_form_inherit_company |
res.users.form.inherit.company | res.users | form | Inherits base_user_role.view_res_users_form_inherit |
HTTP endpoints (1)
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
| (inherited route override) | HomeExtended.web_load_menus |
inherited | http | ALL |
Models touched (3)
New fields (0)
No new fields.
Public methods (1)-
session_info(self, *args, **kwargs)Based on the selected companies (cids), calculate the roles to enable. A role should be enabled only when it applies to all selected companies.
New fields (0)
No new fields.
Public methods (1)-
authenticate(self, *args, **kwargs)
New fields (2)
-
allowed_company_idsMany2manyrelated='user_id.company_ids' -
company_idMany2one → res.companydomain="[('id', 'in', allowed_company_ids)]"help='If set, this role only applies when this is the main company selected. Otherwise it applies to all companies.' args: 'res.company', 'Company'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…