diff --git a/impersonate_login/README.rst b/impersonate_login/README.rst
index d49e1ee999..ceef070224 100644
--- a/impersonate_login/README.rst
+++ b/impersonate_login/README.rst
@@ -7,7 +7,7 @@ Impersonate Login
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:5b81c79d20d3679798c2f35fe1c7dc4cbe88abe7567ee2f21f05f63ff34c0bd2
+ !! source digest: sha256:501ad96751e358edef9d921d3cd01157ee6f2d22e37e4b576d135d77b3616f00
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,13 +17,13 @@ Impersonate Login
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github
- :target: https://github.com/OCA/server-auth/tree/14.0/impersonate_login
+ :target: https://github.com/OCA/server-auth/tree/15.0/impersonate_login
:alt: OCA/server-auth
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/server-auth-14-0/server-auth-14-0-impersonate_login
+ :target: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-impersonate_login
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
- :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=14.0
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=15.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -66,7 +66,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -108,6 +108,6 @@ Current `maintainer `__:
|maintainer-Kev-Roche|
-This module is part of the `OCA/server-auth `_ project on GitHub.
+This module is part of the `OCA/server-auth `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/impersonate_login/__manifest__.py b/impersonate_login/__manifest__.py
index 4426594969..1ed60aed83 100644
--- a/impersonate_login/__manifest__.py
+++ b/impersonate_login/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Impersonate Login",
"summary": "tools",
- "version": "14.0.1.0.1",
+ "version": "15.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/server-auth",
"author": "Akretion, Odoo Community Association (OCA)",
@@ -18,15 +18,16 @@
"mail",
],
"data": [
- "views/assets.xml",
"views/res_users.xml",
"views/impersonate_log.xml",
"views/res_config_settings.xml",
"security/group.xml",
"security/ir.model.access.csv",
],
- "qweb": [
- "static/src/xml/user_menu.xml",
- ],
+ "assets": {
+ "web.assets_backend": [
+ "impersonate_login/static/src/js/user_menu.esm.js",
+ ],
+ },
"pre_init_hook": "pre_init_hook",
}
diff --git a/impersonate_login/models/impersonate_log.py b/impersonate_login/models/impersonate_log.py
index 349c46eb69..83089611a6 100644
--- a/impersonate_login/models/impersonate_log.py
+++ b/impersonate_login/models/impersonate_log.py
@@ -12,7 +12,6 @@ class ImpersonateLog(models.Model):
user_id = fields.Many2one(
comodel_name="res.users",
- string="User",
)
impersonated_partner_id = fields.Many2one(
comodel_name="res.partner",
diff --git a/impersonate_login/models/res_users.py b/impersonate_login/models/res_users.py
index 22a2939ee5..071da91115 100644
--- a/impersonate_login/models/res_users.py
+++ b/impersonate_login/models/res_users.py
@@ -75,10 +75,12 @@ def impersonate_login(self):
request.session, request.env
)
- # reload the client;
+ # reload the client; open the first available root menu
+ menu = self.env["ir.ui.menu"].search([("parent_id", "=", False)])[:1]
return {
"type": "ir.actions.client",
"tag": "reload",
+ "params": {"menu_id": menu.id},
}
@api.model
@@ -89,7 +91,7 @@ def action_impersonate_login(self):
action = self.env["ir.actions.act_window"]._for_xml_id(
"base.action_res_users"
)
- action["views"] = [[self.env.ref("base.view_users_tree").id, "tree"]]
+ action["views"] = [[self.env.ref("base.view_users_tree").id, "list"]]
action["domain"] = [
("id", "!=", self.env.user.id),
("share", "=", False),
@@ -122,8 +124,10 @@ def back_to_origin_login(self):
f"Logout as {self._get_partner_name(self._uid)}"
)
- # reload the client;
+ # reload the client; open the first available root menu
+ menu = self.env["ir.ui.menu"].search([("parent_id", "=", False)])[:1]
return {
"type": "ir.actions.client",
"tag": "reload",
+ "params": {"menu_id": menu.id},
}
diff --git a/impersonate_login/static/description/index.html b/impersonate_login/static/description/index.html
index 743b825c14..59d0ad8b0b 100644
--- a/impersonate_login/static/description/index.html
+++ b/impersonate_login/static/description/index.html
@@ -1,3 +1,4 @@
+
@@ -367,9 +368,9 @@
Impersonate Login
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:5b81c79d20d3679798c2f35fe1c7dc4cbe88abe7567ee2f21f05f63ff34c0bd2
+!! source digest: sha256:501ad96751e358edef9d921d3cd01157ee6f2d22e37e4b576d135d77b3616f00
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
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”.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
-feedback.