Base User Role History

base_user_role_history
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_history
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, Christopher Rogos, MCodes
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:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon provides history for roles modifications on users. Each time
a role is added/updated/unlinked on a user, a new role history line is
created mentioning what changes were made and who made them. Theses
informations are directly accessible from users via a smart button.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
base_user_role_line_history_form_view base.user.role.line.history.form (in base_user_role_history) base.user.role.line.history form New
base_user_role_line_history_search_view base.user.role.line.history.search (in base_user_role_history) base.user.role.line.history search New
base_user_role_line_history_tree_view base.user.role.line.history.tree (in base_user_role_history) base.user.role.line.history list New
res_users_form_view res.users.form (in base_user_role_history) res.users div Inherits base.view_users_form
Models touched (3)

New fields (10)
  • new_date_from Date
    string='New start date'
  • new_date_to Date
    string='New end date'
  • new_is_enabled Boolean
    string='Active after edit'
  • new_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' string='New role'
  • old_date_from Date
    string='Old start date'
  • old_date_to Date
    string='Old end date'
  • old_is_enabled Boolean
    string='Active before edit'
  • old_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' string='Old role'
  • performed_action Selection
    required=True selection=[('add', 'Add'), ('unlink', 'Delete'), ('edit', 'Edit')] string='Action'
  • user_id Many2one → res.users
    comodel_name='res.users' index=True ondelete='cascade' string='User'
Public methods (0)

No public methods.

New fields (1)
  • last_role_line_modification Datetime
    compute='_compute_last_role_line_modification'
Public methods (1)
  • show_role_lines_history(self)

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, vals)
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/17.0/base_user_role_history
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Christopher Rogos, Mohamed Osman
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon provides history for roles modifications on users. Each time
a role is added/updated/unlinked on a user, a new role history line is
created mentioning what changes were made and who made them. Theses
informations are directly accessible from users via a smart button.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
base_user_role_line_history_form_view base.user.role.line.history.form (in base_user_role_history) base.user.role.line.history form New
base_user_role_line_history_search_view base.user.role.line.history.search (in base_user_role_history) base.user.role.line.history search New
base_user_role_line_history_tree_view base.user.role.line.history.tree (in base_user_role_history) base.user.role.line.history tree New
res_users_form_view res.users.form (in base_user_role_history) res.users div Inherits base.view_users_form
Models touched (3)

New fields (10)
  • new_date_from Date
    string='New start date'
  • new_date_to Date
    string='New end date'
  • new_is_enabled Boolean
    string='Active after edit'
  • new_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' string='New role'
  • old_date_from Date
    string='Old start date'
  • old_date_to Date
    string='Old end date'
  • old_is_enabled Boolean
    string='Active before edit'
  • old_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' string='Old role'
  • performed_action Selection
    required=True selection=[('add', 'Add'), ('unlink', 'Delete'), ('edit', 'Edit')] string='Action'
  • user_id Many2one → res.users
    comodel_name='res.users' index=True ondelete='cascade' string='User'
Public methods (0)

No public methods.

New fields (1)
  • last_role_line_modification Datetime
    compute='_compute_last_role_line_modification'
Public methods (1)
  • show_role_lines_history(self)

New fields (0)

No new fields.

Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • unlink(self)
  • write(self, vals)
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/16.0/base_user_role_history
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSArnaud Pineux, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:54:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
base_user_role_line_history_form_view base.user.role.line.history.form (in base_user_role_history) base.user.role.line.history form New
base_user_role_line_history_search_view base.user.role.line.history.search (in base_user_role_history) base.user.role.line.history search New
base_user_role_line_history_tree_view base.user.role.line.history.tree (in base_user_role_history) base.user.role.line.history tree New
res_users_form_view res.users.form (in base_user_role_history) res.users div Inherits base.view_users_form
Models touched (2)

New fields (10)
  • new_date_from Date
    readonly=True string='New start date'
  • new_date_to Date
    readonly=True string='New end date'
  • new_is_enabled Boolean
    readonly=True string='Active after edit'
  • new_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='New role'
  • old_date_from Date
    readonly=True string='Old start date'
  • old_date_to Date
    readonly=True string='Old end date'
  • old_is_enabled Boolean
    readonly=True string='Active before edit'
  • old_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='Old role'
  • performed_action Selection
    readonly=True required=True selection=[('add', 'Add'), ('unlink', 'Delete'), ('edit', 'Edit')] string='Action'
  • user_id Many2one → res.users
    comodel_name='res.users' index=True ondelete='cascade' readonly=True string='User'
Public methods (1)
  • create_from_vals(self, old_role_line_values_by_user, new_role_line_values_by_user)
    @api.model
    This method creates user role line history objects based on given old/new values. old_role_line_values_by_user and new_role_line_values_by_user are like: {user_id: {role_line_id: {role_line_values}, }, }

New fields (1)
  • last_role_line_modification Datetime
    readonly=True string='Last roles modification'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • show_role_lines_history(self)
  • write(self, vals)
REPOSITORY
REPOSITORYOCA/server-backend
GIT
GIThttps://github.com/OCA/server-backend.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-backend/tree/13.0/base_user_role_history
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, OCA-git-bot, Benoit Aimont
WEBSITE
WEBSITEhttps://github.com/OCA/server-backend
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/server-backend:
    - base_user_role
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
base_user_role_line_history_form_view base.user.role.line.history.form (in base_user_role_history) base.user.role.line.history form New
base_user_role_line_history_search_view base.user.role.line.history.search (in base_user_role_history) base.user.role.line.history search New
base_user_role_line_history_tree_view base.user.role.line.history.tree (in base_user_role_history) base.user.role.line.history tree New
res_users_form_view res.users.form (in base_user_role_history) res.users div Inherits base.view_users_form
Models touched (2)

New fields (10)
  • new_date_from Date
    readonly=True string='New start date'
  • new_date_to Date
    readonly=True string='New end date'
  • new_is_enabled Boolean
    readonly=True string='Active after edit'
  • new_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='New role'
  • old_date_from Date
    readonly=True string='Old start date'
  • old_date_to Date
    readonly=True string='Old end date'
  • old_is_enabled Boolean
    readonly=True string='Active before edit'
  • old_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='Old role'
  • performed_action Selection
    readonly=True required=True selection=[('add', 'Add'), ('unlink', 'Delete'), ('edit', 'Edit')] string='Action'
  • user_id Many2one → res.users
    comodel_name='res.users' index=True ondelete='cascade' readonly=True string='User'
Public methods (1)
  • create_from_vals(self, old_role_line_values_by_user, new_role_line_values_by_user)
    @api.model
    This method creates user role line history objects based on given old/new values. old_role_line_values_by_user and new_role_line_values_by_user are like: {user_id: {role_line_id: {role_line_values}, }, }

New fields (1)
  • last_role_line_modification Datetime
    readonly=True string='Last roles modification'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • show_role_lines_history(self)
  • write(self, vals)
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_history
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSOCA Transbot, Sébastien BEAU, oca-travis, Weblate, OCA-git-bot, Benoit Aimont, hugues de keyzer
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
    - base_suspend_security
odoo/odoo:
    - mail
    - base
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
base_user_role_line_history_form_view base.user.role.line.history.form (in base_user_role_history) base.user.role.line.history form New
base_user_role_line_history_search_view base.user.role.line.history.search (in base_user_role_history) base.user.role.line.history search New
base_user_role_line_history_tree_view base.user.role.line.history.tree (in base_user_role_history) base.user.role.line.history tree New
res_users_form_view res.users.form (in base_user_role_history) res.users div Inherits base.view_users_form
Models touched (2)

New fields (10)
  • new_date_from Date
    readonly=True string='New start date'
  • new_date_to Date
    readonly=True string='New end date'
  • new_is_enabled Boolean
    readonly=True string='Active after edit'
  • new_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='New role'
  • old_date_from Date
    readonly=True string='Old start date'
  • old_date_to Date
    readonly=True string='Old end date'
  • old_is_enabled Boolean
    readonly=True string='Active before edit'
  • old_role_id Many2one → res.users.role
    comodel_name='res.users.role' index=True ondelete='cascade' readonly=True string='Old role'
  • performed_action Selection
    readonly=True required=True selection=[('add', 'Add'), ('unlink', 'Delete'), ('edit', 'Edit')] string='Action'
  • user_id Many2one → res.users
    comodel_name='res.users' index=True ondelete='cascade' readonly=True string='User'
Public methods (1)
  • create_from_vals(self, old_role_line_values_by_user, new_role_line_values_by_user)
    @api.model
    This method creates user role line history objects based on given old/new values. old_role_line_values_by_user and new_role_line_values_by_user are like: {user_id: {role_line_id: {role_line_values}, }, }

New fields (1)
  • last_role_line_modification Datetime
    readonly=True string='Last roles modification'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • show_role_lines_history(self)
    @api.multi
  • write(self, vals)
    @api.multi
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/server-backend
PULL REQUEST
PULL REQUEST[19.0][MIG] base_user_role_history: Migration to 19.0 (#384)