From 356e4ed9bd5ff40a78ed16f74f0c04d437ea2469 Mon Sep 17 00:00:00 2001
From: Olivier Dony <odo@openerp.com>
Date: Mon, 9 Jan 2012 15:09:58 +0100
Subject: [PATCH] [FIX] translation: remove calls to trans_update_res_ids

Calling this method is no longer required since the
merge of the new code for loading translations using
a temporary table. The method itself has been removed
at revision 3919, so all calls to it should have been
cleaned up as well.
Rev.3919 = rco@openerp.com-20111223104824-fup1cjbjni1fsty1

bzr revid: odo@openerp.com-20120109140958-10i1ti16tw327580
---
 openerp-server                                                | 1 -
 openerp/addons/base/module/wizard/base_import_language.py     | 1 -
 openerp/addons/base/module/wizard/base_update_translations.py | 1 -
 openerp/tools/translate.py                                    | 4 +---
 4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/openerp-server b/openerp-server
index 71a52d5f06b6..b5275ec98597 100755
--- a/openerp-server
+++ b/openerp-server
@@ -140,7 +140,6 @@ def import_translation():
     cr = openerp.pooler.get_db(dbname).cursor()
     openerp.tools.trans_load( cr, config["translate_in"], config["language"],
         context=context)
-    openerp.tools.trans_update_res_ids(cr)
     cr.commit()
     cr.close()
 
diff --git a/openerp/addons/base/module/wizard/base_import_language.py b/openerp/addons/base/module/wizard/base_import_language.py
index acc0aa9640ad..94b9ae4db59a 100644
--- a/openerp/addons/base/module/wizard/base_import_language.py
+++ b/openerp/addons/base/module/wizard/base_import_language.py
@@ -63,7 +63,6 @@ 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, context=context)
-        tools.trans_update_res_ids(cr)
         fileobj.close()
         return {}
 
diff --git a/openerp/addons/base/module/wizard/base_update_translations.py b/openerp/addons/base/module/wizard/base_update_translations.py
index ebdfc05b75c1..0a9f5e9cca95 100644
--- a/openerp/addons/base/module/wizard/base_update_translations.py
+++ b/openerp/addons/base/module/wizard/base_update_translations.py
@@ -47,7 +47,6 @@ 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'}
 
diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py
index 7ae4b29dd286..dbf6bd98f88d 100644
--- a/openerp/tools/translate.py
+++ b/openerp/tools/translate.py
@@ -852,9 +852,7 @@ def trans_load(cr, filename, lang, verbose=True, context=None):
         return None
 
 def trans_load_data(cr, fileobj, fileformat, lang, lang_name=None, verbose=True, context=None):
-    """Populates the ir_translation table. Fixing the res_ids so that they point
-    correctly to ir_model_data is done in a separate step, using the
-    'trans_update_res_ids' function below."""
+    """Populates the ir_translation table."""
     logger = logging.getLogger('i18n')
     if verbose:
         logger.info('loading translation file for language %s', lang)
-- 
GitLab