[Erp5-report] r20537 - /erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/ta...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Apr 15 16:37:46 CEST 2008
Author: romain
Date: Tue Apr 15 16:37:46 2008
New Revision: 20537
URL: http://svn.erp5.org?rev=20537&view=rev
Log:
Call Base_checkConsistency in the before scripts of some transitions of task_workflow and task_report_workflow.
Removed:
erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_workflow/scripts/Order_validateData.xml
Removed: erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_workflow/scripts/Order_validateData.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_workflow/scripts/Order_validateData.xml?rev=20536&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_workflow/scripts/Order_validateData.xml (original)
+++ erp5/trunk/bt5/erp5_project/WorkflowTemplateItem/portal_workflow/task_workflow/scripts/Order_validateData.xml (removed)
@@ -1,174 +1,0 @@
-<?xml version="1.0"?>
-<ZopeData>
- <record id="1" aka="AAAAAAAAAAE=">
- <pickle>
- <tuple>
- <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
- <tuple/>
- </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 encoding="cdata"><![CDATA[
-
-# This script check that necessary data exists on Order\n
-from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
-order = state_change[\'object\']\n
-error_message = \'\'\n
-message_list = []\n
-\n
-if order.getSource() is None:\n
- message_list.append(\'No Source\')\n
-if order.getStartDate() is None and order.getStopDate() is not None:\n
- order.setStartDate(order.getStopDate())\n
-if order.getStartDate() is None:\n
- message_list.append("No Date")\n
-if order.getDestination() is None:\n
- message_list.append(\'No Destination\')\n
-for line in order.objectValues(portal_type=order.getPortalOrderMovementTypeList()):\n
- if line.getResourceValue() is None:\n
- message_list.append("No Resource for line with id: %s" % line.getId())\n
-\n
-if len(message_list) > 0:\n
- raise ValidationFailed, "Warning: " + " --- ".join(message_list)\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>state_change, **kw</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>1</int> </value>
- </item>
- <item>
- <key> <string>co_varnames</string> </key>
- <value>
- <tuple>
- <string>state_change</string>
- <string>kw</string>
- <string>Products.DCWorkflow.DCWorkflow</string>
- <string>ValidationFailed</string>
- <string>_getitem_</string>
- <string>order</string>
- <string>error_message</string>
- <string>message_list</string>
- <string>_getattr_</string>
- <string>None</string>
- <string>_getiter_</string>
- <string>line</string>
- <string>len</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>Order_validateData</string> </value>
- </item>
- <item>
- <key> <string>warnings</string> </key>
- <value>
- <tuple/>
- </value>
- </item>
- </dictionary>
- </pickle>
- </record>
-</ZopeData>
More information about the Erp5-report
mailing list