[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
This commit is contained in:
committed by
Raphael Collet
parent
8a18ef0c5a
commit
1d553eea7b
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user