Improvements
bzr revid: hda@tinyerp.com-20091006091904-ydd0s9d08vu5076w
This commit is contained in:
parent
0bd2091336
commit
a3920319f0
|
@ -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>
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue