From a3920319f0c37309b93f4420f0a1661034fa7b16 Mon Sep 17 00:00:00 2001 From: "HDA (OpenERP)" Date: Tue, 6 Oct 2009 14:49:04 +0530 Subject: [PATCH] Improvements bzr revid: hda@tinyerp.com-20091006091904-ydd0s9d08vu5076w --- bin/addons/base/rng/view.rng | 1 + bin/service/security.py | 4 ++-- bin/service/web_services.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/addons/base/rng/view.rng b/bin/addons/base/rng/view.rng index 6ba66108639..4b717e926c1 100644 --- a/bin/addons/base/rng/view.rng +++ b/bin/addons/base/rng/view.rng @@ -423,6 +423,7 @@ + diff --git a/bin/service/security.py b/bin/service/security.py index 7eec0db7a6c..5c9e91975c7 100644 --- a/bin/service/security.py +++ b/bin/service/security.py @@ -28,9 +28,9 @@ _uid_cache = {} def login(db, login, password): cr = pooler.get_db(db).cursor() if password: - cr.execute('select id from res_users where login=%s and password=%s and active', (login.encode('utf-8'), password.encode('utf-8'))) + cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) else: - cr.execute('select id from res_users where login=%s and password is null and active', (login.encode('utf-8'),)) + cr.execute('select id from res_users where login=%s and password is null and active', (tools.ustr(login),)) res = cr.fetchone() cr.close() if res: diff --git a/bin/service/web_services.py b/bin/service/web_services.py index 604a67b2634..46a66594162 100644 --- a/bin/service/web_services.py +++ b/bin/service/web_services.py @@ -86,7 +86,7 @@ class db(netsvc.Service): serv.actions[id]['progress'] = 0 clean = False cr = sql_db.db_connect(db_name).cursor() -# tools.init_db(cr) + tools.init_db(cr) cr.commit() cr.close() cr = None