modification:

on upgrdae module wizard, after finsihed upgrdation,reload translation

bzr revid: hmo@tinyerp.com-3c9e990b8fbbabea6414dce88802b49063832327
This commit is contained in:
Harshad Modi 2008-07-02 09:08:29 +00:00
parent b6e1745b8a
commit 6b59dec916
1 changed files with 10 additions and 0 deletions

View File

@ -30,6 +30,8 @@
import wizard
import pooler
import os
import tools
view_form_end = """<?xml version="1.0"?>
<form string="System upgrade done">
@ -90,6 +92,14 @@ class wizard_info_get(wizard.interface):
mod_obj.download(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
lang_obj=pool.get('res.lang')
lang_ids=lang_obj.search(cr, uid, [])
langs=lang_obj.browse(cr, uid, lang_ids)
for lang in langs:
if lang.code and lang.code != 'en_US':
filename=os.path.join(tools.config["root_path"], "i18n", lang.code + ".csv")
tools.trans_load(cr.dbname, filename, lang.code)
return {}
def _config(self, cr, uid, data, context=None):