summaryrefslogtreecommitdiff
path: root/odoo/tools
diff options
context:
space:
mode:
authorjev-odoo <jev@odoo.com>2020-11-18 08:40:11 +0000
committerjev <jev@odoo.com>2020-11-20 14:57:42 +0000
commit650476812ee7d57f1d954be5557a3856448ffe5e (patch)
tree0f40090a0b05d33322687d974d4c14f36f2f55fb /odoo/tools
parent13819e6afab1d30b644e79cfb1112478cfa5b32d (diff)
[FIX] core: incomplete traceback
XML loading always raises a ParseError, however when an XML loading error is triggered from an HTTP request (e.g. a button) the final ParseError logged & shown to the user would not be properly chained to its ancestor, leading the original cause to be lost and issues being much harder to diagnose. This cause is lost in _handle_exception where we duplicate the exception in order to chain it correctly, the __cause__ of the source exception was not properly copied over, and would thus break the chain. The fix also requires explicitly chaining the ParseError to its cause, this should not be necessary but the cause is also lost if this is missing, it is not clear why. opw-2381776 closes odoo/odoo#61914 Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/tools')
-rw-r--r--odoo/tools/convert.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/tools/convert.py b/odoo/tools/convert.py
index 0f01ec55cc0..6295f03e56c 100644
--- a/odoo/tools/convert.py
+++ b/odoo/tools/convert.py
@@ -682,7 +682,7 @@ form: module.record_id""" % (xml_id,)
rec.getroottree().docinfo.URL,
rec.sourceline,
etree.tostring(rec, encoding='unicode').rstrip()
- ))
+ )) from e
finally:
self._noupdate.pop()
self.envs.pop()