Skip to content

Commit

Permalink
[IMP] base: improve AccessError message legibility for ir.server.actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbottemanne committed Aug 22, 2023
1 parent 20bc3c8 commit 6a38f6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions odoo/tools/safe_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit 6a38f6c

Please sign in to comment.