[FIX] fix problem of improve condtion of checking key is available in dict.

lp bug: https://launchpad.net/bugs/799637 fixed

bzr revid: ysa@tinyerp.com-20110620110330-brg01vy68rmo6wiq
This commit is contained in:
Yogesh (OpenERP) 2011-06-20 16:33:30 +05:30
parent 36d98cb14f
commit f6c88941f5
1 changed files with 3 additions and 3 deletions

View File

@ -1289,15 +1289,15 @@ class orm_template(object):
res[f]['readonly'] = True
res[f]['states'] = {}
if hasattr(res[f], 'string'):
if 'string' in res[f]:
res_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'field', context.get('lang', False) or 'en_US')
if res_trans:
res[f]['string'] = res_trans
if hasattr(res[f], 'help'):
if 'help' in res[f]:
help_trans = translation_obj._get_source(cr, user, self._name + ',' + f, 'help', context.get('lang', False) or 'en_US')
if help_trans:
res[f]['help'] = help_trans
if hasattr(res[f], 'selection'):
if 'selection' in res[f]:
if isinstance(field.selection, (tuple, list)):
sel = field.selection
sel2 = []