Skip to content
Snippets Groups Projects
Commit 58e463e7 authored by Karnav Sojitra's avatar Karnav Sojitra
Browse files

[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#131673

Signed-off-by: default avatarAchraf Ben Azzouz (abz) <abz@odoo.com>
parent bfc83df7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment