From 1d553eea7b4d2ea74e6a5014b0a08930552200ad Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Fri, 23 Nov 2018 09:57:38 +0000 Subject: [PATCH] [FIX] models.py: log the full traceback when record import fails Without the full stack trace, it is very hard for the developers to know why and where the record creation has failed. closes odoo/odoo#29143 --- odoo/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/models.py b/odoo/models.py index 785a616a743..db2c6ed2b90 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -893,6 +893,7 @@ class BaseModel(object): # avoid broken transaction) and keep going cr.execute('ROLLBACK TO SAVEPOINT model_load_save') except Exception as e: + _logger.exception("Error while loading record") message = (_('Unknown error during import:') + ' %s: %s' % (type(e), unicode(e.message or e.name))) moreinfo = _('Resolve other errors first') messages.append(dict(info, type='error', message=message, moreinfo=moreinfo))