[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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user