Browse Source

[FIX] Incorrect import.

pull/2/head
Sylvain LE GAL 11 years ago
parent
commit
7711cde3c5
  1. 6
      auth_admin_passkey/model/res_users.py

6
auth_admin_passkey/model/res_users.py

@ -21,13 +21,13 @@
############################################################################## ##############################################################################
import datetime import datetime
from ast import literal_eval
from openerp import SUPERUSER_ID from openerp import SUPERUSER_ID
from openerp import pooler from openerp import pooler
from openerp import exceptions from openerp import exceptions
from openerp.osv.orm import Model from openerp.osv.orm import Model
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp.tools.safe_eval import safe_eval
class res_users(Model): class res_users(Model):
@ -46,9 +46,9 @@ class res_users(Model):
icp_obj = self.pool['ir.config_parameter'] icp_obj = self.pool['ir.config_parameter']
admin_user = self.browse(cr, SUPERUSER_ID, SUPERUSER_ID) admin_user = self.browse(cr, SUPERUSER_ID, SUPERUSER_ID)
login_user = self.browse(cr, SUPERUSER_ID, user_id) login_user = self.browse(cr, SUPERUSER_ID, user_id)
send_to_admin = literal_eval(icp_obj.get_param(
send_to_admin = safe_eval(icp_obj.get_param(
cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_admin', 'True')) cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_admin', 'True'))
send_to_user = literal_eval(icp_obj.get_param(
send_to_user = safe_eval(icp_obj.get_param(
cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_user', 'True')) cr, SUPERUSER_ID, 'auth_admin_passkey.send_to_user', 'True'))
if send_to_admin and admin_user.email: if send_to_admin and admin_user.email:

Loading…
Cancel
Save