From 656f38ea02e1a475803492a5f9a250d3bafc28ac Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 25 Jun 2018 10:39:11 +0200 Subject: [PATCH] [FIX] auth_admin_passkey : AccessError sending mail (#1298) * [FIX] AccessError sending mail --- auth_admin_passkey/__manifest__.py | 2 +- auth_admin_passkey/models/res_users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auth_admin_passkey/__manifest__.py b/auth_admin_passkey/__manifest__.py index d42e5171f..92b9974a5 100644 --- a/auth_admin_passkey/__manifest__.py +++ b/auth_admin_passkey/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Authentification - Admin Passkey', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'category': 'base', 'author': "GRAP,Odoo Community Association (OCA)", 'website': 'http://www.grap.coop', diff --git a/auth_admin_passkey/models/res_users.py b/auth_admin_passkey/models/res_users.py index 5b9815573..96be2e0be 100644 --- a/auth_admin_passkey/models/res_users.py +++ b/auth_admin_passkey/models/res_users.py @@ -19,7 +19,7 @@ class ResUsers(models.Model): mail_obj = self.env['mail.mail'].sudo() icp_obj = self.env['ir.config_parameter'] - admin_user = self.browse(SUPERUSER_ID) + admin_user = self.sudo().browse(SUPERUSER_ID) login_user = self.browse(user_id) send_to_admin = safe_eval(