From deba4763f0591b6d855530bf51dffcb3c8d2bc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 13 Sep 2008 13:39:33 +0200 Subject: [PATCH] Use one Env to evaluate all lines in workflow expression --- trytond/wkf_service/wkf_expr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trytond/wkf_service/wkf_expr.py b/trytond/wkf_service/wkf_expr.py index f580eab37d..51a51e69f9 100644 --- a/trytond/wkf_service/wkf_expr.py +++ b/trytond/wkf_service/wkf_expr.py @@ -40,16 +40,16 @@ class Env(dict): def eval_expr(cursor, ident, action): res = False + user = ident[0] + model = ident[1] + obj_id = ident[2] + env = Env(cursor, user, model, obj_id) for line in action.split('\n'): - user = ident[0] - model = ident[1] - obj_id = ident[2] if line == 'True': res = True elif line =='False': res = False else: - env = Env(cursor, user, model, obj_id) res = eval(line, env) return res