[ADD] Enable access to workflow engine in server actions that run arbitrary python...
authorRichard Mathot (OpenERP) <rim@openerp.com>
Fri, 21 Feb 2014 11:53:47 +0000 (12:53 +0100)
committerRichard Mathot (OpenERP) <rim@openerp.com>
Fri, 21 Feb 2014 11:53:47 +0000 (12:53 +0100)
(a workflow variable gives now access to trg_* methods of the workflow engine)

bzr revid: rim@openerp.com-20140221115347-rpar6uyiwx1z9deu

openerp/addons/base/ir/ir_actions.py
openerp/addons/base/ir/ir_actions.xml

index 31c1700..9adbf2c 100644 (file)
@@ -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):
index 7ac0252..26c08d4 100644 (file)
                                             <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>