Improvements

bzr revid: hda@tinyerp.com-20091006091904-ydd0s9d08vu5076w
This commit is contained in:
HDA (OpenERP) 2009-10-06 14:49:04 +05:30
parent 0bd2091336
commit a3920319f0
3 changed files with 4 additions and 3 deletions

View File

@ -423,6 +423,7 @@
<rng:ref name="page" />
<rng:ref name="separator"/>
<rng:ref name="button"/>
<rng:ref name="group"/>
<rng:ref name="filter"/>
<rng:element name="properties"><rng:empty/></rng:element>
<rng:element name="newline"><rng:empty/></rng:element>

View File

@ -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:

View File

@ -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