Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 7 Odoo series since 10.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
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
OCA/server-backend:
odoo/odoo:
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 IDNameModelTypeStatus
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)HandlerAuthTypeMethodsFlags
(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_ids Many2many
    related='user_id.company_ids'
  • company_id Many2one → res.company
    domain="[('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'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…