[FIX] web_services: fix incorrect query to set admin's password and lang
bzr revid: rco@openerp.com-20121219093816-atf0p0jtuwv6hd31
This commit is contained in:
parent
5822bfa5ba
commit
b63518345e
|
@ -77,11 +77,11 @@ def _initialize_db(serv, id, db_name, demo, lang, user_password):
|
|||
mids = modobj.search(cr, SUPERUSER_ID, [('state', '=', 'installed')])
|
||||
modobj.update_translations(cr, SUPERUSER_ID, mids, lang)
|
||||
|
||||
cr.execute('UPDATE res_users SET password=%s, lang=%s, active=True WHERE login=%s', (
|
||||
user_password, lang, 'admin'))
|
||||
cr.execute('SELECT login, password ' \
|
||||
' FROM res_users ' \
|
||||
' ORDER BY login')
|
||||
# update admin's password and lang
|
||||
values = {'password': user_password, 'lang': lang}
|
||||
pool.get('res.users').write(cr, SUPERUSER_ID, [SUPERUSER_ID], values)
|
||||
|
||||
cr.execute('SELECT login, password FROM res_users ORDER BY login')
|
||||
serv.actions[id].update(users=cr.dictfetchall(), clean=True)
|
||||
cr.commit()
|
||||
cr.close()
|
||||
|
|
Loading…
Reference in New Issue