[FIX] Export Translation : Warning on Non-existing record instead of breaking flow
lp bug: https://launchpad.net/bugs/437729 fixed bzr revid: jvo@tinyerp.com-20090929123923-yw60232e0sgu5nbp
This commit is contained in:
parent
369755e92a
commit
a5d33505a8
|
@ -424,14 +424,14 @@ def trans_generate(lang, modules, dbname=None):
|
|||
xml_name = "%s.%s" % (module, encode(xml_name))
|
||||
|
||||
if not pool.get(model):
|
||||
logger.notifyChannel("db", netsvc.LOG_ERROR, "unable to find object %r" % (model,))
|
||||
logger.notifyChannel("db", netsvc.LOG_ERROR, "Unable to find object %r" % (model,))
|
||||
continue
|
||||
|
||||
try:
|
||||
obj = pool.get(model).browse(cr, uid, res_id)
|
||||
except BrowseRecordError:
|
||||
logger.notifyChannel("db", netsvc.LOG_ERROR, "unable to find object %r with id %d" % (model, res_id))
|
||||
exists = pool.get(model).exists(cr, uid, res_id)
|
||||
if not exists:
|
||||
logger.notifyChannel("db", netsvc.LOG_WARNING, "Unable to find object %r with id %d" % (model, res_id))
|
||||
continue
|
||||
obj = pool.get(model).browse(cr, uid, res_id)
|
||||
|
||||
if model=='ir.ui.view':
|
||||
d = xml.dom.minidom.parseString(encode(obj.arch))
|
||||
|
|
Loading…
Reference in New Issue