From f3b158e65bfd5326b2decd4bd4186766c8a1ae45 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 18 Oct 2019 10:22:14 +0000 Subject: [PATCH] [FIX] tools: skip bad translations Do not return a boolean but skip bad translations Introduced at 19e50ea37435c2d9 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) --- odoo/tools/translate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tools/translate.py b/odoo/tools/translate.py index 761da202dc1..370e6cb361f 100644 --- a/odoo/tools/translate.py +++ b/odoo/tools/translate.py @@ -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