summaryrefslogtreecommitdiff
path: root/bin/addons/base/module
diff options
context:
space:
mode:
authorVo Minh Thu <vmt@openerp.com>2011-01-06 14:06:54 +0100
committerVo Minh Thu <vmt@openerp.com>2011-01-06 14:06:54 +0100
commitfbc332935b6cd6cae38acd44ceabf21a9cae2bee (patch)
tree8e1dc6c3f0322ea107b8f9161b394df6e35a16f1 /bin/addons/base/module
parent4629c7af7838304d686b6c59197b2b1ac981704f (diff)
[IMP] translation: added trans_update_res_ids to resolve the res_ids from ir_translation.
bzr revid: vmt@openerp.com-20110106130654-tp8jyjo3h3nvgqbq
Diffstat (limited to 'bin/addons/base/module')
-rw-r--r--bin/addons/base/module/module.py1
-rw-r--r--bin/addons/base/module/wizard/base_import_language.py1
-rw-r--r--bin/addons/base/module/wizard/base_update_translations.py1
3 files changed, 3 insertions, 0 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index 3237da178cc..d050355ab05 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -514,6 +514,7 @@ class module(osv.osv):
tools.trans_load(cr, f, lang, verbose=False, context=context2)
elif iso_lang != 'en':
logger.warning('module %s: no translation for language %s', mod.name, iso_lang)
+ tools.trans_update_res_ids(cr)
def check(self, cr, uid, ids, context=None):
logger = logging.getLogger('init')
diff --git a/bin/addons/base/module/wizard/base_import_language.py b/bin/addons/base/module/wizard/base_import_language.py
index 96dcd1df794..d73cd0864a6 100644
--- a/bin/addons/base/module/wizard/base_import_language.py
+++ b/bin/addons/base/module/wizard/base_import_language.py
@@ -57,6 +57,7 @@ class base_language_import(osv.osv_memory):
fileobj.seek(0)
tools.trans_load_data(cr, fileobj, fileformat, import_data.code, lang_name=import_data.name)
+ tools.trans_update_res_ids(cr)
fileobj.close()
return {}
diff --git a/bin/addons/base/module/wizard/base_update_translations.py b/bin/addons/base/module/wizard/base_update_translations.py
index f79f4c0f1fa..bd950ea628d 100644
--- a/bin/addons/base/module/wizard/base_update_translations.py
+++ b/bin/addons/base/module/wizard/base_update_translations.py
@@ -47,6 +47,7 @@ class base_update_translations(osv.osv_memory):
buf=cStringIO.StringIO()
tools.trans_export(this.lang, ['all'], buf, 'csv', cr)
tools.trans_load_data(cr, buf, 'csv', this.lang, lang_name=lang_name)
+ tools.trans_update_res_ids(cr)
buf.close()
return {'type': 'ir.actions.act_window_close'}