User profiles

base_user_role_profile
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/18.0/base_user_role_profile
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSWeblate, oca-ci, Florian Mounier
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:19
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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 IDNameModelTypeStatus
view_res_users_form_inherit res.users.role.form.inherit res.users.role xpath Inherits base_user_role.view_res_users_role_form
view_res_users_form_inherit_profile res.users.form.inherit res.users xpath 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 field Inherits base_user_role.view_res_users_role_search
view_res_users_role_tree res.users.role.list res.users.role field Inherits base_user_role.view_res_users_role_tree
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (4)
  • include_default_profile Boolean
    help="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_id Many2one → res.users.profile
    default=<expr> args: 'res.users.profile', 'Current profile'
  • profile_ids Many2many → res.users.profile
    string='Currently allowed profiles' args: 'res.users.profile'
  • restrict_profile_switching Boolean
    help='If enabled, the user will be prevented from changing their profile. This acts as a security measure to lock users into their current profile.'
Public methods (3)
  • action_profile_change(self, vals)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (3)
  • name Char
  • role_ids One2many → res.users.role
    string='Roles' args: 'res.users.role', 'profile_id'
  • user_ids Many2many → res.users
    compute='_compute_user_ids' string='Allowed users' args: 'res.users'
Public methods (0)

No public methods.

New fields (1)
  • profile_id Many2one → res.users.profile
    args: 'res.users.profile', 'Profile'
Public methods (1)
  • write(self, vals)

New fields (1)
  • profile_id Many2one
    related='role_id.profile_id'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/14.0/base_user_role_profile
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSoca-travis, Weblate, OCA-git-bot, KevinKhao, majouda
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
assets_backend User Role Profile assets ir.ui.view qweb Inherits web.assets_backend
view_res_users_form_inherit res.users.role.form.inherit res.users.role xpath Inherits base_user_role.view_res_users_role_form
view_res_users_form_inherit_profile res.users.form.inherit res.users xpath 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.tree res.users.profile tree New
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • profile_id Many2one → res.users.profile
    default=<expr> args: 'res.users.profile', 'Current profile'
  • profile_ids Many2many → res.users.profile
    string='Currently allowed profiles' args: 'res.users.profile'
Public methods (3)
  • action_profile_change(self, vals)
  • create(self, vals)
    @api.model
  • write(self, vals)

New fields (3)
  • name Char
    args: 'Name'
  • role_ids One2many → res.users.role
    string='Roles' args: 'res.users.role', 'profile_id'
  • user_ids Many2many → res.users
    compute='_compute_user_ids' string='Allowed users' args: 'res.users'
Public methods (0)

No public methods.

New fields (1)
  • profile_id Many2one → res.users.profile
    args: 'res.users.profile', 'Profile'
Public methods (0)

No public methods.

New fields (1)
  • profile_id Many2one
    related='role_id.profile_id'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/12.0/base_user_role_profile
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSOCA Transbot, Sébastien BEAU, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
assets_backend User Role Profile assets ir.ui.view qweb Inherits web.assets_backend
view_res_users_form_inherit res.users.role.form.inherit res.users.role xpath Inherits base_user_role.view_res_users_role_form
view_res_users_form_inherit_profile res.users.form.inherit res.users xpath Inherits base.view_users_form
view_res_users_form_show_company res.users.form.inherit res.users xpath Inherits base_user_role.view_res_users_form_inherit
view_res_users_profile_form res.users.profile.form res.users.profile form New
view_res_users_profile_tree res.users.profile.tree res.users.profile tree New
Models touched (5)

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • profile_id Many2one → res.users.profile
    default=<expr> args: 'res.users.profile', 'Current profile'
  • profile_ids Many2many → res.users.profile
    string='Currently allowed profiles' args: 'res.users.profile'
Public methods (3)
  • action_profile_change(self, vals)
  • create(self, vals)
    @api.model
  • write(self, vals)

New fields (3)
  • name Char
    args: 'Name'
  • role_ids One2many → res.users.role
    string='Roles' args: 'res.users.role', 'profile_id'
  • user_ids Many2many → res.users
    compute='_compute_user_ids' string='Allowed users' args: 'res.users'
Public methods (0)

No public methods.

New fields (1)
  • profile_id Many2one → res.users.profile
    args: 'res.users.profile', 'Profile'
Public methods (0)

No public methods.

New fields (1)
  • profile_id Many2one
    related='role_id.profile_id'
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/server-backend
PULL REQUEST
PULL REQUEST[19.0][MIG] base_user_role_profile: Migration to v19 (#442)