User roles by company
base_user_role_company · OCA/server-backend
OCA/server-tools 10.0 → OCA/server-backend 12.0–19.0
Health
80/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 7 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.05 MB
Module directory on disk
Code analysis
0 migration notes
3 models
2 views
1 HTTP endpoint
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.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
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'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…