From b7ba91c3630aadd2d787f83bc8e26bbd3aadac8d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 8 Aug 2007 15:58:22 +0000
Subject: [PATCH] use Base_viewWorkflowActionDialog on workflow transitions.
 Remove Base_DoWorkflowAction it was a mistake, all workflow transitions must
 use Base_viewWorkflowActionDialog, even if it apparently doesn't make sense
 to enter a comment

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15567 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_core/Base_DoWorkflowAction.xml       | 178 ------------------
 .../transitions/disable_action.xml            |   6 +-
 .../transitions/enable_action.xml             |   2 +-
 .../transitions/invalidate_action.xml         |   2 +-
 .../transitions/validate_action.xml           |   2 +-
 product/ERP5/bootstrap/erp5_core/bt/revision  |   2 +-
 6 files changed, 5 insertions(+), 187 deletions(-)
 delete mode 100644 product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_DoWorkflowAction.xml

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_DoWorkflowAction.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_DoWorkflowAction.xml
deleted file mode 100644
index 7ba6ec65d1..0000000000
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_DoWorkflowAction.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
-      </tuple>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Python_magic</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>__ac_local_roles__</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string># Immediatly invoke a workflow action. Usefull do put as in action box\n
-from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
-from ZTUtils import make_query\n
-request = context.REQUEST\n
-\n
-url_params = { }\n
-if request.get(\'selection_name\') :\n
-  url_params[\'selection_name\'] = request[\'selection_name\']\n
-if request.get(\'selection_index\') :\n
-  url_params[\'selection_index\'] = request[\'selection_index\']\n
-\n
-try :\n
-  context.portal_workflow.doActionFor(\n
-    context,\n
-    action_name,\n
-    wf_id = wf_id)\n
-except ValidationFailed, message:\n
-  url_params[\'portal_status_message\'] = message\n
-  context.REQUEST.RESPONSE.redirect(\n
-    "%s/view?%s" % (context.absolute_url(), make_query(url_params)))\n
-\n
-context.REQUEST.RESPONSE.redirect( "%s/view?%s" % (context.absolute_url(),\n
-  make_query(url_params)))\n
-\n
-# vim: syntax=python\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_filepath</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>action_name, wf_id</string> </value>
-        </item>
-        <item>
-            <key> <string>errors</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_code</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>co_argcount</string> </key>
-                        <value> <int>2</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>action_name</string>
-                            <string>wf_id</string>
-                            <string>Products.DCWorkflow.DCWorkflow</string>
-                            <string>ValidationFailed</string>
-                            <string>ZTUtils</string>
-                            <string>make_query</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
-                            <string>request</string>
-                            <string>url_params</string>
-                            <string>_getitem_</string>
-                            <string>_write_</string>
-                            <string>message</string>
-                          </tuple>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>func_defaults</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>Base_DoWorkflowAction</string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable_action.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable_action.xml
index 0335b8ee6d..3ffe753353 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable_action.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/disable_action.xml
@@ -28,11 +28,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string encoding="cdata"><![CDATA[
-
-%(content_url)s/Base_DoWorkflowAction?action_name=disable_action&wf_id=preference_workflow
-
-]]></string> </value>
+            <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?field_my_workflow_action=disable_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml
index 0755347643..3b441f33d9 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/preference_workflow/transitions/enable_action.xml
@@ -28,7 +28,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?field_my_workflow_action=enable_action</string> </value>
+            <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?field_my_workflow_action=enable_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/invalidate_action.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/invalidate_action.xml
index 5e51eda1f0..5a434ddd42 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/invalidate_action.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/invalidate_action.xml
@@ -34,7 +34,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value>
+            <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=invalidate_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/validate_action.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/validate_action.xml
index bc9484e135..9013bd7a1a 100644
--- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/validate_action.xml
+++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/validation_workflow/transitions/validate_action.xml
@@ -34,7 +34,7 @@
         </item>
         <item>
             <key> <string>actbox_url</string> </key>
-            <value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=validate_action</string> </value>
+            <value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=validate_action</string> </value>
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 1380537bfd..c4c828bd4e 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-385
\ No newline at end of file
+386
\ No newline at end of file
-- 
2.30.9