Impersonate Login

impersonate_login
REPOSITORY
REPOSITORYOCA/server-auth
GIT
GIThttps://github.com/OCA/server-auth.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-auth/tree/19.0/impersonate_login
VERSION
VERSION 1.0.1
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-git-bot, oca-ci, Melody Uffreduzzi, Milan Topuzov
WEBSITE
WEBSITEhttps://github.com/OCA/server-auth
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows one user (for example, a member of the support team) to log in as another user.
The impersonation session can be exited by clicking on the button "Back to Original User".

To ensure that any abuse of this feature will not go unnoticed, the following measures are in place:

* In the chatter, it is displayed who is the user that is logged as another user.
* Mails and messages are sent from the original user.
* Impersonated logins are logged and can be consulted through the Settings -> Technical menu.
* You can optionally forbid impersonation of users with "Administration: Settings"
  rights by enabling the related option in the settings.
There is an alternative module to allow logins as another user (auth_admin_passkey),
but it does not support these security mechanisms.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
impersonate_log_tree impersonate.log.tree impersonate.log list New
impersonate_res_users_tree res.users field Inherits base.view_users_tree
view_res_config_settings_impersonate res.config.settings.impersonate res.config.settings block Inherits base_setup.res_config_settings_view_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    Overwrite the write_uid with the impersonating user

New fields (4)
  • date_end Datetime
    string='End Date'
  • date_start Datetime
    string='Start Date'
  • impersonated_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Logged as'
  • user_id Many2one → res.users
    comodel_name='res.users'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • body Html
    compute='_compute_message_body' inverse='_inverse_message_body' readonly=False store=True
  • impersonated_author_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_impersonated_author_id' store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • restrict_impersonate_admin_settings Boolean
    config_parameter='impersonate_login.restrict_impersonate_admin_settings' default=False help="If enabled, users with the 'Administration: Settings' access right cannot be impersonated." string="Restrict Impersonation of 'Administration: Settings' Users"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • action_impersonate_login(self)
    @api.model
  • back_to_origin_login(self)
    @api.model
  • impersonate_login(self)
REPOSITORY
REPOSITORYOCA/server-auth
GIT
GIThttps://github.com/OCA/server-auth.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-auth/tree/18.0/impersonate_login
VERSION
VERSION 1.1.2
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-git-bot, Simone Rubino, oca-ci, CarlosRoca13, Kev-Roche, andrea, feihu.zhang
WEBSITE
WEBSITEhttps://github.com/OCA/server-auth
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - bus
    - web_tour
    - html_editor
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows one user (for example, a member of the support team) to log in as another user.
The impersonation session can be exited by clicking on the button "Back to Original User".

To ensure that any abuse of this feature will not go unnoticed, the following measures are in place:

* In the chatter, it is displayed who is the user that is logged as another user.
* Mails and messages are sent from the original user.
* Impersonated logins are logged and can be consulted through the Settings -> Technical menu.
* You can optionally forbid impersonation of users with "Administration: Settings"
  rights by enabling the related option in the settings.
There is an alternative module to allow logins as another user (auth_admin_passkey),
but it does not support these security mechanisms.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
impersonate_log_tree impersonate.log.tree impersonate.log list New
impersonate_res_users_tree res.users field Inherits base.view_users_tree
view_res_config_settings_impersonate res.config.settings.impersonate res.config.settings block Inherits base_setup.res_config_settings_view_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    Overwrite the write_uid with the impersonating user

New fields (4)
  • date_end Datetime
    string='End Date'
  • date_start Datetime
    string='Start Date'
  • impersonated_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Logged as'
  • user_id Many2one → res.users
    comodel_name='res.users'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • body Html
    compute='_compute_message_body' inverse='_inverse_message_body' readonly=False store=True
  • impersonated_author_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_impersonated_author_id' index=True store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • restrict_impersonate_admin_settings Boolean
    config_parameter='impersonate_login.restrict_impersonate_admin_settings' default=False help="If enabled, users with the 'Administration: Settings' access right cannot be impersonated." string="Restrict Impersonation of 'Administration: Settings' Users"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • action_impersonate_login(self)
    @api.model
  • back_to_origin_login(self)
    @api.model
  • impersonate_login(self)
REPOSITORY
REPOSITORYOCA/server-auth
GIT
GIThttps://github.com/OCA/server-auth.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-auth/tree/17.0/impersonate_login
VERSION
VERSION 1.0.2
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-git-bot, oca-ci, andrea
WEBSITE
WEBSITEhttps://github.com/OCA/server-auth
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:04
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows one user (for example, a member of the support team) to log in as another user.
The impersonation session can be exited by clicking on the button "Back to Original User".

To ensure that any abuse of this feature will not go unnoticed, the following measures are in place:

* In the chatter, it is displayed who is the user that is logged as another user.
* Mails and messages are sent from the original user.
* Impersonated logins are logged and can be consulted through the Settings -> Technical menu.
* 
There is an alternative module to allow logins as another user (auth_admin_passkey),
but it does not support these security mechanisms.

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
impersonate_log_tree impersonate.log.tree impersonate.log tree New
impersonate_res_users_tree res.users field Inherits base.view_users_tree
Models touched (6)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    Overwrite the write_uid with the impersonating user

New fields (4)
  • date_end Datetime
    string='End Date'
  • date_start Datetime
    string='Start Date'
  • impersonated_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Logged as'
  • user_id Many2one → res.users
    comodel_name='res.users'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • body Html
    compute='_compute_message_body' inverse='_inverse_message_body' readonly=False store=True
  • impersonated_author_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_impersonated_author_id' store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • action_impersonate_login(self)
    @api.model
  • back_to_origin_login(self)
    @api.model
  • impersonate_login(self)
REPOSITORY
REPOSITORYOCA/server-auth
GIT
GIThttps://github.com/OCA/server-auth.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-auth/tree/16.0/impersonate_login
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYTools
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion
COMMITTERS
COMMITTERSGitHub, Weblate, OCA-git-bot, oca-ci, andrea, Pablo Castelo
WEBSITE
WEBSITEhttps://github.com/OCA/server-auth
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows one user (for example, a member of the support team) to log in as another user.
The impersonation session can be exited by clicking on the button "Back to Original User".

To ensure that any abuse of this feature will not go unnoticed, the following measures are in place:

* In the chatter, it is displayed who is the user that is logged as another user.
* Mails and messages are sent from the original user.
* Impersonated logins are logged and can be consulted through the Settings -> Technical menu.
* You can optionally forbid impersonation of users with "Administration: Settings"
  rights by enabling the related option in the settings.
There is an alternative module to allow logins as another user (auth_admin_passkey),
but it does not support these security mechanisms.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
impersonate_log_tree impersonate.log.tree impersonate.log tree New
impersonate_res_users_tree res.users field Inherits base.view_users_tree
view_res_config_settings_impersonate res.config.settings.impersonate res.config.settings xpath Inherits base_setup.res_config_settings_view_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)
    Overwrite the write_uid with the impersonating user

New fields (4)
  • date_end Datetime
    string='End Date'
  • date_start Datetime
    string='Start Date'
  • impersonated_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Logged as'
  • user_id Many2one → res.users
    comodel_name='res.users'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • body Html
    compute='_compute_message_body' inverse='_inverse_message_body' readonly=False store=True
  • impersonated_author_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_impersonated_author_id' store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • restrict_impersonate_admin_settings Boolean
    config_parameter='impersonate_login.restrict_impersonate_admin_settings' default=False help="If enabled, users with the 'Administration: Settings' access right cannot be impersonated." string="Restrict Impersonation of 'Administration: Settings' Users"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • action_impersonate_login(self)
    @api.model
  • back_to_origin_login(self)
    @api.model
  • impersonate_login(self)
REPOSITORY
REPOSITORYOCA/server-auth
GIT
GIThttps://github.com/OCA/server-auth.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-auth/tree/14.0/impersonate_login
VERSION
VERSION 1.0.1
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-git-bot, oca-ci, Eduard Brahas
WEBSITE
WEBSITEhttps://github.com/OCA/server-auth
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:55
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
assets_backend assets_backend ir.ui.view qweb Inherits web.assets_backend
assets_common assets_common ir.ui.view qweb Inherits web.assets_common
impersonate_log_tree impersonate.log.tree impersonate.log tree New
impersonate_res_users_tree res.users field Inherits base.view_users_tree
view_res_config_settings_impersonate res.config.settings.impersonate res.config.settings xpath Inherits base_setup.res_config_settings_view_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • write(self, vals)

New fields (4)
  • date_end Datetime
    string='End Date'
  • date_start Datetime
    string='Start Date'
  • impersonated_partner_id Many2one → res.partner
    comodel_name='res.partner' string='Logged as'
  • user_id Many2one → res.users
    comodel_name='res.users' string='User'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • session_info(self)

New fields (2)
  • body Html
    compute='_compute_message_body' inverse='_inverse_message_body' readonly=False store=True
  • impersonated_author_id Many2one → res.partner
    comodel_name='res.partner' compute='_compute_impersonated_author_id' store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • restrict_impersonate_admin_settings Boolean
    config_parameter='impersonate_login.restrict_impersonate_admin_settings' default=False help="If enabled, users with the 'Administration: Settings' access right cannot be impersonated." string="Restrict Impersonation of 'Administration: Settings' Users"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • action_impersonate_login(self)
    @api.model
  • back_to_origin_login(self)
    @api.model
  • impersonate_login(self)