[FIX] tools: raise validation error while invalid expression
When the user tries to modify the view with an invalid xpath expression, an XPathSyntaxError traceback will appear. Steps to produce: 1. Install the Accounting module. 2. Settings > Technical > UI > Views > Open any view 3. Invalidate expr syntax and try to save, thus an error will be generated. Error: XPathSyntaxError: Invalid expression This commit handles XPathSyntaxError by raising ValidationError instead of a traceback. sentry-4377014622 closes odoo/odoo#135614 X-original-commit: 58e463e7 Signed-off-by:Achraf Ben Azzouz (abz) <abz@odoo.com>
Loading