[FIX] ir_translation: rename method load to load_module_terms to avoid name clash with load call from base_import
bzr revid: mat@openerp.com-20131230125307-kald7ir36bvq3o7c
This commit is contained in:
parent
f3737b122c
commit
216303c2fa
|
@ -425,7 +425,7 @@ class ir_translation(osv.osv):
|
|||
"""
|
||||
return ir_translation_import_cursor(cr, uid, self, context=context)
|
||||
|
||||
def load(self, cr, modules, langs, context=None):
|
||||
def load_module_terms(self, cr, modules, langs, context=None):
|
||||
context = dict(context or {}) # local copy
|
||||
for module_name in modules:
|
||||
modpath = openerp.modules.get_module_path(module_name)
|
||||
|
|
|
@ -759,7 +759,7 @@ class module(osv.osv):
|
|||
elif not isinstance(filter_lang, (list, tuple)):
|
||||
filter_lang = [filter_lang]
|
||||
modules = [m.name for m in self.browse(cr, uid, ids) if m.state == 'installed']
|
||||
self.pool.get('ir.translation').load(cr, modules, filter_lang, context=context)
|
||||
self.pool.get('ir.translation').load_module_terms(cr, modules, filter_lang, context=context)
|
||||
|
||||
def check(self, cr, uid, ids, context=None):
|
||||
for mod in self.browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -311,7 +311,7 @@ class test_translation(common.TransactionCase):
|
|||
self.res_category = self.registry('res.partner.category')
|
||||
self.ir_translation = self.registry('ir.translation')
|
||||
cr, uid = self.cr, self.uid
|
||||
self.registry('ir.translation').load(cr, ['base'], ['fr_FR'])
|
||||
self.registry('ir.translation').load_module_terms(cr, ['base'], ['fr_FR'])
|
||||
self.cat_id = self.res_category.create(cr, uid, {'name': 'Customers'})
|
||||
self.ir_translation.create(cr, uid, {'name': 'res.partner.category,name', 'module':'base',
|
||||
'value': 'Clients', 'res_id': self.cat_id, 'lang':'fr_FR', 'state':'translated', 'type': 'model'})
|
||||
|
|
Loading…
Reference in New Issue