[FIX]tools, translate: more tolerant code, if the model does not exist anymore (impossible to syncrhonize translation terms if there are ir_model_fields with non-existing models)

bzr revid: dle@openerp.com-20131127161154-t8xfjiytqq8ja8fh
This commit is contained in:
Denis Ledoux 2013-11-27 17:11:54 +01:00
parent 2a9de8ba6f
commit f6d7ee39fc
1 changed files with 1 additions and 1 deletions

View File

@ -684,7 +684,7 @@ def trans_generate(lang, modules, cr):
except AttributeError, exc:
_logger.error("name error in %s: %s", xml_name, str(exc))
continue
objmodel = registry[obj.model]
objmodel = registry.get(obj.model)
if not objmodel or not field_name in objmodel._columns:
continue
field_def = objmodel._columns[field_name]