Fix context evaluation with datetime object

This commit is contained in:
C?dric Krier 2008-04-03 17:14:34 +02:00
parent 99132dced2
commit 5bdd2f5fc6

View file

@ -120,7 +120,9 @@ class Action(object):
'active_ids': datas.get('ids',[]),
'user': rpc._USER,
}
ctx.update(eval(action.get('context','{}'), ctx.copy()))
eval_ctx = ctx.copy()
eval_ctx['datetime'] = datetime
ctx.update(eval(action.get('context','{}'), eval_ctx))
ctx.update(context)
domain_context = ctx.copy()