summaryrefslogtreecommitdiff
path: root/bin/tools
diff options
context:
space:
mode:
authorHDA (OpenERP) <hda@tinyerp.com>2009-10-01 17:38:20 +0530
committerHDA (OpenERP) <hda@tinyerp.com>2009-10-01 17:38:20 +0530
commiteefe57c93ec8705cbdaa1d510c2df5024d3f0b41 (patch)
tree2aadcf39ae088d8411b44f1cca0fbf2e634c8c8e /bin/tools
parentd514c8c694cfbea01c74d7b2b254ff9d08efed36 (diff)
parent92df67814c628cb475ebd5fd4921c4bed570f31b (diff)
[MERGE]
bzr revid: hda@tinyerp.com-20091001120820-2tke1hk1ixd7nbb8
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 e4dd6588054..2d92778c380 100644
--- a/bin/tools/translate.py
+++ b/bin/tools/translate.py
@@ -426,14 +426,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 = etree.XML(encode(obj.arch))