bzr revid: fp@tinyerp.com-20081220080239-yg14hb7cjpi21rba
This commit is contained in:
Fabien Pinckaers
2008-12-20 09:02:39 +01:00
parent da52cdfd2d
commit 6fc6b033d1
4 changed files with 10 additions and 7 deletions
+3 -2
View File
@@ -512,11 +512,12 @@ def load_module_graph(cr, graph, status=None, check_access_rules=True, **kwargs)
package_todo.append(package.name)
ver = release.major_version + '.' + package.data.get('version', '1.0')
# update the installed version in database...
cr.execute("update ir_module_module set state='installed', latest_version=%s where id=%s", (ver, mid,))
cr.commit()
#cr.execute("update ir_module_module set state='installed', latest_version=%s where id=%s", (ver, mid,))
# Set new modules and dependencies
modobj = pool.get('ir.module.module')
modobj.write(cr, 1, [mid], {'state':'installed', 'latest_version':ver})
cr.commit()
# Update translations for all installed languages
if modobj:
@@ -81,10 +81,10 @@ class wizard_info_get(wizard.interface):
unmet_packages = []
mod_dep_obj = pool.get('ir.module.module.dependency')
for mod in mod_obj.browse(cr, uid, ids):
depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
if dep_mod.state in ('unknown','uninstalled'):
unmet_packages.append(dep_mod.name)
unmet_packages.append(dep_mod.name)
if len(unmet_packages):
raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
mod_obj.download(cr, uid, ids, context=context)
+2 -2
View File
@@ -92,8 +92,8 @@ class db(netsvc.Service):
mids = modobj.search(cr, 1, [('state', '=', 'installed')])
modobj.update_translations(cr, 1, mids, lang)
cr.execute('UPDATE res_users SET password=%s, active=True WHERE login=%s', (
user_password, 'admin'))
cr.execute('UPDATE res_users SET password=%s, context_lang=%s, active=True WHERE login=%s', (
user_password, lang, 'admin'))
cr.execute('SELECT login, password, name ' \
' FROM res_users ' \
' ORDER BY login')
+2
View File
@@ -629,6 +629,8 @@ def ustr(value):
@return: unicode string
"""
if (value is None) or (value is False):
return value
if isinstance(value, unicode):
return value