Commit b7ba91c3 authored by Jérome Perrin's avatar Jérome Perrin

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
parent 9efbfac1
<?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>
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
385
\ No newline at end of file
386
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment