From 6072b519f9de8fdac79e3c1669897171e834b2c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 25 Apr 2015 12:44:21 +0200 Subject: [PATCH] [FIX] mis_builder: use safe_eval in aep --- mis_builder/models/aep.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mis_builder/models/aep.py b/mis_builder/models/aep.py index d81bb914..048d9f7c 100644 --- a/mis_builder/models/aep.py +++ b/mis_builder/models/aep.py @@ -1,6 +1,8 @@ import re from collections import defaultdict + from openerp.osv import expression +from openerp.tools.safe_eval import safe_eval class AccountingExpressionProcessor(object): @@ -107,7 +109,7 @@ class AccountingExpressionProcessor(object): account_codes = account_codes[1:-1] account_codes = [a.strip() for a in account_codes.split(',')] domain = domain or '[]' - domain = tuple(eval(domain)) # TODO: safe_eval + domain = tuple(safe_eval(domain)) return field, mode, account_codes, domain def parse_expr(self, expr):