[FIX] tools: skip bad translations

Do not return a boolean but skip bad translations
Introduced at 19e50ea374

Fixes odoo/odoo#39001
At least fix the error that is thrown, however, this does not solve
the initial error of trying to export the terms of a record that is no
longer present in the database.
As this issue is no longer reproducable, just log a warning as it was
expected.

closes odoo/odoo#39122

X-original-commit: 5c0677bf2fbf6d18978989f1ee70e4a0946da035
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Martin Trigaux
2019-10-21 12:59:02 +00:00
committed by fw-bot
parent 52f67d87d1
commit f3b158e65b
+1 -1
View File
@@ -931,7 +931,7 @@ def trans_generate(lang, modules, cr):
record = env[model].browse(res_id)
if not record.exists():
_logger.warning(u"Unable to find object %r with id %d", model, res_id)
return False
continue
if not translatable_model(record):
continue