[FIX] strip server action code before passing it to eval
Python 2.7's compile handles trailing whitespaces correctly, Python 2.6 does not and blows up. bzr revid: xmo@openerp.com-20130304164423-83vm9teu7b3c52y3
This commit is contained in:
parent
b921444d6f
commit
018416630d
|
@ -608,7 +608,7 @@ class actions_server(osv.osv):
|
|||
.read(cr, uid, action.action_id.id, context=context)
|
||||
|
||||
if action.state=='code':
|
||||
eval(action.code, cxt, mode="exec", nocopy=True) # nocopy allows to return 'action'
|
||||
eval(action.code.strip(), cxt, mode="exec", nocopy=True) # nocopy allows to return 'action'
|
||||
if 'action' in cxt:
|
||||
return cxt['action']
|
||||
|
||||
|
|
Loading…
Reference in New Issue