From f90423a2f22a11c85e573f8d75571901426b27ad Mon Sep 17 00:00:00 2001 From: Vincent Van Rossem Date: Thu, 11 Dec 2025 11:08:45 +0100 Subject: [PATCH] [FIX] web_m2x_options_manager: safe_eval() ValueError ``safe_eval()`` raises a ``ValueError`` when evaluating ``node`` options containing boolean values written in lowercase (`true` or `false`). Fixes ``` ValueError: : "name 'true' is not defined" while evaluating "{'': [true|false}" ``` --- web_m2x_options_manager/models/m2x_create_edit_option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_m2x_options_manager/models/m2x_create_edit_option.py b/web_m2x_options_manager/models/m2x_create_edit_option.py index 9acb5cd45bf2..f1fecf8b901a 100644 --- a/web_m2x_options_manager/models/m2x_create_edit_option.py +++ b/web_m2x_options_manager/models/m2x_create_edit_option.py @@ -181,7 +181,7 @@ def _get_node_options_eval_context(self): """ self.ensure_one() eval_ctx = dict(self.env.context or []) - eval_ctx.update({"context": dict(eval_ctx)}) + eval_ctx.update({"context": dict(eval_ctx), "true": True, "false": False}) return eval_ctx def _read_own_options(self):