diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py index 116a379062e0b..a5bdd30e0aee6 100644 --- a/odoo/tools/safe_eval.py +++ b/odoo/tools/safe_eval.py @@ -361,6 +361,10 @@ def safe_eval(expr, globals_dict=None, locals_dict=None, mode="eval", nocopy=Fal raise except ZeroDivisionError: raise + except odoo.exceptions.ValidationError: + raise + except odoo.exceptions.AccessError: + raise except Exception as e: raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)) def test_python_expr(expr, mode="eval"):