From 6430ca499f34433281bdda2c79b51119932f502b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Gonz=C3=A1lez?= Date: Sun, 31 May 2020 01:30:16 +0000 Subject: [PATCH] [FIX] tools/safe_eval: Add missing builtin `sorted` Before this commit, the function `sorted` wasn't available on `safe_eval`, even though it's a Python built-in, which mades it unavailable for Python-code evaluation, e.g. server actions. After this commit, the above function is now accessible. closes odoo/odoo#59715 X-original-commit: a725c8927963848c3f8ada3b71897a54b740cce6 Signed-off-by: Xavier Morel (xmo) --- odoo/tools/safe_eval.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py index 828b42063cc..83741408eb3 100644 --- a/odoo/tools/safe_eval.py +++ b/odoo/tools/safe_eval.py @@ -258,6 +258,7 @@ _BUILTINS = { 'sum': sum, 'reduce': functools.reduce, 'filter': filter, + 'sorted': sorted, 'round': round, 'len': len, 'repr': repr,