Skip to content

Commit 656f38e

Browse files
authored
[FIX] auth_admin_passkey : AccessError sending mail (#1298)
* [FIX] AccessError sending mail
1 parent 4e0ac1f commit 656f38e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

auth_admin_passkey/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{
77
'name': 'Authentification - Admin Passkey',
8-
'version': '10.0.1.0.0',
8+
'version': '10.0.1.0.1',
99
'category': 'base',
1010
'author': "GRAP,Odoo Community Association (OCA)",
1111
'website': 'http://www.grap.coop',

auth_admin_passkey/models/res_users.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _send_email_passkey(self, user_id):
1919
mail_obj = self.env['mail.mail'].sudo()
2020
icp_obj = self.env['ir.config_parameter']
2121

22-
admin_user = self.browse(SUPERUSER_ID)
22+
admin_user = self.sudo().browse(SUPERUSER_ID)
2323
login_user = self.browse(user_id)
2424

2525
send_to_admin = safe_eval(

0 commit comments

Comments
 (0)