summaryrefslogtreecommitdiff
path: root/bin/tools
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2009-10-08 22:50:28 +0300
committerP. Christeas <p_christ@hol.gr>2009-10-08 22:50:28 +0300
commitffb287777caaa42c2fcaf5b982c117e3c0c8fbe5 (patch)
tree3d18a1e9eeb0dd5ae23bb1f5342f59d4f323569e /bin/tools
parentafd06e6bf2f2b5be4b0de9b5056ace5c36f134fc (diff)
parent3c28a101b9c353973a7516c710134405ba55baca (diff)
Merge remote branch 'origin/master' into xrg
Conflicts: bin/addons/base/ir/ir_cron.py bzr revid: p_christ@hol.gr-20091008195028-eth801qgzj78zrm1
Diffstat (limited to 'bin/tools')
-rw-r--r--bin/tools/translate.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/tools/translate.py b/bin/tools/translate.py
index c64ca7a5c24..37bd8326f76 100644
--- a/bin/tools/translate.py
+++ b/bin/tools/translate.py
@@ -458,14 +458,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))