[MERGE] translations: import using lower-level sql (translations load about 6 times...
authorRaphael Collet <rco@openerp.com>
Fri, 23 Dec 2011 10:48:24 +0000 (11:48 +0100)
committerRaphael Collet <rco@openerp.com>
Fri, 23 Dec 2011 10:48:24 +0000 (11:48 +0100)
bzr revid: rco@openerp.com-20111223104824-fup1cjbjni1fsty1

1  2 
openerp/addons/base/base.sql
openerp/addons/base/ir/ir_translation.py
openerp/addons/base/module/module.py

Simple merge
@@@ -203,6 -317,13 +317,11 @@@ class ir_translation(osv.osv)
          result = super(ir_translation, self).unlink(cursor, user, ids, context=context)
          return result
  
+     def _get_import_cursor(self, cr, uid, context=None):
+         """ Return a cursor-like object for fast inserting translations
+         """
 -        if context is None:
 -            context = {}
+         return ir_translation_import_cursor(cr, uid, self, context=context)
  ir_translation()
  
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@@ -592,7 -554,7 +592,6 @@@ 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)
 -        # tools.trans_update_res_ids(cr)
  
      def check(self, cr, uid, ids, context=None):
          logger = logging.getLogger('init')