From 81caf7f3b247f8ea1212a3354d01c7eb79c14399 Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Mon, 22 Jun 2009 10:06:28 +0000 Subject: [PATCH] Remove the useless '**kw' parameter (state_change is the only possible parameter for workflow scripts) and provide a way to pass parameters to the activate call. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27721 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../scripts/Delivery_afterEdit.xml | 8 +++++--- bt5/erp5_base/bt/revision | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Delivery_afterEdit.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Delivery_afterEdit.xml index 7a42daafde..42a9dd4a7f 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Delivery_afterEdit.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/delivery_causality_workflow/scripts/Delivery_afterEdit.xml @@ -54,7 +54,8 @@ <item> <key> <string>_body</string> </key> <value> <string>delivery = state_change[\'object\']\n -delivery.activate().updateCausalityState()\n +activate_kw = state_change[\'kwargs\'].get(\'activate_kw\') or {}\n +delivery.activate(**activate_kw).updateCausalityState()\n </string> </value> </item> <item> @@ -65,7 +66,7 @@ delivery.activate().updateCausalityState()\n </item> <item> <key> <string>_params</string> </key> - <value> <string>state_change, **kw</string> </value> + <value> <string>state_change</string> </value> </item> <item> <key> <string>_proxy_roles</string> </key> @@ -100,10 +101,11 @@ delivery.activate().updateCausalityState()\n <value> <tuple> <string>state_change</string> - <string>kw</string> <string>_getitem_</string> <string>delivery</string> <string>_getattr_</string> + <string>activate_kw</string> + <string>_apply_</string> </tuple> </value> </item> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 1fb8d9e69e..e88ff725aa 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -601 \ No newline at end of file +602 \ No newline at end of file -- 2.30.9