[ADD] Enable access to workflow engine in server actions that run arbitrary python code
(a workflow variable gives now access to trg_* methods of the workflow engine) bzr revid: rim@openerp.com-20140221115347-rpar6uyiwx1z9deu
This commit is contained in:
parent
170f3ef1f9
commit
6b40002f98
|
@ -552,6 +552,7 @@ class ir_actions_server(osv.osv):
|
|||
# - uid: current user id
|
||||
# - context: current context
|
||||
# - time: Python time module
|
||||
# - workflow: Workflow engine
|
||||
# If you plan to return an action, assign: action = {...}""",
|
||||
'use_relational_model': 'base',
|
||||
'use_create': 'new',
|
||||
|
@ -936,6 +937,7 @@ class ir_actions_server(osv.osv):
|
|||
'uid': uid,
|
||||
'user': user,
|
||||
'context': context,
|
||||
'workflow': workflow
|
||||
}
|
||||
|
||||
def run(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -412,6 +412,7 @@
|
|||
<li>cr: database cursor</li>
|
||||
<li>uid: current user id</li>
|
||||
<li>context: current context</li>
|
||||
<li>workflow: Workflow engine</li>
|
||||
</ul>
|
||||
<div>
|
||||
<p>Example of condition expression using Python</p>
|
||||
|
|
Loading…
Reference in New Issue