[IMP] only call ir.translation when necessary
bzr revid: abo@openerp.com-20130123153722-iijbl8hvesstneq3
This commit is contained in:
+2
-1
@@ -3504,7 +3504,6 @@ class BaseModel(object):
|
||||
|
||||
res = {}
|
||||
|
||||
translation_obj = self.pool.get('ir.translation')
|
||||
for parent in self._inherits:
|
||||
res.update(self.pool.get(parent).fields_get(cr, user, allfields, context))
|
||||
|
||||
@@ -3520,6 +3519,8 @@ class BaseModel(object):
|
||||
res[f]['states'] = {}
|
||||
|
||||
if 'lang' in context:
|
||||
translation_obj = self.pool.get('ir.translation')
|
||||
|
||||
if 'string' in res[f]:
|
||||
res_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'field', context['lang'])
|
||||
if res_trans:
|
||||
|
||||
Reference in New Issue
Block a user