Commit 24cc9adc authored by Rafael Monnerat's avatar Rafael Monnerat

Modified the Scritps in workflows for use "state_change['object']" instead of ...

Modified the Scritps in workflows for use "state_change['object']" instead of  "state_change.object".

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14404 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aa3eefc7
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
\n \n
# Create Delivery Applied Rule (if required)\n # Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n packing_list.updateAppliedRule()\n
...@@ -125,8 +125,9 @@ packing_list.activate().updateCausalityState()\n ...@@ -125,8 +125,9 @@ packing_list.activate().updateCausalityState()\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string>
<string>None</string> <string>None</string>
</tuple> </tuple>
</value> </value>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
\n \n
# Create Delivery Applied Rule (if required)\n # Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n packing_list.updateAppliedRule()\n
...@@ -133,8 +133,9 @@ packing_list.activate().updateCausalityState()\n ...@@ -133,8 +133,9 @@ packing_list.activate().updateCausalityState()\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string>
<string>packing_list_portal_type</string> <string>packing_list_portal_type</string>
<string>delivery_builder</string> <string>delivery_builder</string>
<string>packing_list_relative_url</string> <string>packing_list_relative_url</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>context = state_change.object\n <value> <string>context = state_change[\'object\']\n
if context.getSimulationState()!=\'draft\':\n if context.getSimulationState()!=\'draft\':\n
context.activate().updateCausalityState()\n context.activate().updateCausalityState()\n
</string> </value> </string> </value>
...@@ -115,8 +115,9 @@ if context.getSimulationState()!=\'draft\':\n ...@@ -115,8 +115,9 @@ if context.getSimulationState()!=\'draft\':\n
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>context</string> <string>context</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
\n \n
stop_date = state_change.kwargs[\'stop_date\']\n stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n start_date = state_change.kwargs[\'start_date\']\n
...@@ -125,9 +125,9 @@ packing_list.portal_workflow.doActionFor(\n ...@@ -125,9 +125,9 @@ packing_list.portal_workflow.doActionFor(\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string>
<string>packing_list</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>packing_list</string>
<string>_getattr_</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string> <string>start_date</string>
</tuple> </tuple>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
\n \n
stop_date = state_change.kwargs[\'stop_date\']\n stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n start_date = state_change.kwargs[\'start_date\']\n
...@@ -150,9 +150,9 @@ delivery_builder.activate(activity=\'SQLQueue\',after_tag=tag).build(explanation ...@@ -150,9 +150,9 @@ delivery_builder.activate(activity=\'SQLQueue\',after_tag=tag).build(explanation
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string>
<string>packing_list</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>packing_list</string>
<string>_getattr_</string>
<string>stop_date</string> <string>stop_date</string>
<string>start_date</string> <string>start_date</string>
<string>tag</string> <string>tag</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n <value> <string>packing_list_content = state_change[\'object\']\n
\n \n
# Clean simulation\n # Clean simulation\n
simulation_movement_list = packing_list_content.getDeliveryRelatedValueList(\n simulation_movement_list = packing_list_content.getDeliveryRelatedValueList(\n
...@@ -133,8 +133,9 @@ for simulation_movement in simulation_movement_list:\n ...@@ -133,8 +133,9 @@ for simulation_movement in simulation_movement_list:\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list_content</string> <string>packing_list_content</string>
<string>_getattr_</string>
<string>simulation_movement_list</string> <string>simulation_movement_list</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>simulation_movement</string> <string>simulation_movement</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n <value> <string>packing_list_content = state_change[\'object\']\n
if packing_list_content.getSimulationState()!=\'draft\':\n if packing_list_content.getSimulationState()!=\'draft\':\n
explanation_value = packing_list_content.getExplanationValue()\n explanation_value = packing_list_content.getExplanationValue()\n
explanation_value.edit()\n explanation_value.edit()\n
...@@ -116,8 +116,9 @@ if packing_list_content.getSimulationState()!=\'draft\':\n ...@@ -116,8 +116,9 @@ if packing_list_content.getSimulationState()!=\'draft\':\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list_content</string> <string>packing_list_content</string>
<string>_getattr_</string>
<string>explanation_value</string> <string>explanation_value</string>
</tuple> </tuple>
</value> </value>
......
...@@ -68,17 +68,9 @@ ...@@ -68,17 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
if packing_list.getSimulationState()!=\'draft\':\n if packing_list.getSimulationState()!=\'draft\':\n
packing_list.activate(after_method_id=(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')).updateAppliedRule(rule_id=\'default_delivery_rule\')\n packing_list.activate(after_method_id=(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')).updateAppliedRule(rule_id=\'default_delivery_rule\')\n
\n
\n
# XXX Not required, reindex of the applied rule is done in updateAppliedRule\n
#my_applied_rule_list = context.getCausalityRelatedValueList(\\\n
# portal_type=\'Applied Rule\')\n
#for my_applied_rule in my_applied_rule_list:\n
# my_applied_rule.activate(after_method_id=\'expand\',priority=2).recursiveImmediateReindexObject()\n
#\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -123,8 +115,9 @@ if packing_list.getSimulationState()!=\'draft\':\n ...@@ -123,8 +115,9 @@ if packing_list.getSimulationState()!=\'draft\':\n
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>LOG=lambda msg:context.log("TaskReport_buildInvoice", msg)\n <value> <string>LOG=lambda msg:context.log("TaskReport_buildInvoice", msg)\n
\n \n
packing_list = sci.object\n packing_list = sci[\'object\']\n
delivery_tool = sci.getPortal().portal_deliveries\n delivery_tool = sci.getPortal().portal_deliveries\n
LOG("Task Report : %s"%packing_list.getPath())\n LOG("Task Report : %s"%packing_list.getPath())\n
\n \n
...@@ -129,8 +129,9 @@ if hasattr(sci.getPortal(), \'accounting_module\'):\n ...@@ -129,8 +129,9 @@ if hasattr(sci.getPortal(), \'accounting_module\'):\n
<tuple> <tuple>
<string>sci</string> <string>sci</string>
<string>LOG</string> <string>LOG</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string>
<string>delivery_tool</string> <string>delivery_tool</string>
<string>hasattr</string> <string>hasattr</string>
</tuple> </tuple>
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<value> <string>LOG=lambda msg:context.log("PackingList_updateAppliedRule", msg)\n <value> <string>LOG=lambda msg:context.log("PackingList_updateAppliedRule", msg)\n
LOG=lambda msg:\'DISABLED\'\n LOG=lambda msg:\'DISABLED\'\n
\n \n
packing_list = state_change.object\n packing_list = state_change[\'object\']\n
\n \n
\n \n
activate_kw = {}\n activate_kw = {}\n
...@@ -142,10 +142,10 @@ packing_list.activate(\n ...@@ -142,10 +142,10 @@ packing_list.activate(\n
<string>state_change</string> <string>state_change</string>
<string>kw</string> <string>kw</string>
<string>LOG</string> <string>LOG</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>activate_kw</string> <string>activate_kw</string>
<string>context</string> <string>_getattr_</string>
<string>related_order</string> <string>related_order</string>
<string>after_path_list</string> <string>after_path_list</string>
<string>None</string> <string>None</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n <value> <string>packing_list = state_change[\'object\']\n
\n \n
# Notify assignee\n # Notify assignee\n
source_person = context.getSourceValue(portal_type="Person")\n source_person = context.getSourceValue(portal_type="Person")\n
...@@ -144,8 +144,9 @@ Please wisit ERP5: %(url)s\n ...@@ -144,8 +144,9 @@ Please wisit ERP5: %(url)s\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>packing_list</string> <string>packing_list</string>
<string>_getattr_</string>
<string>context</string> <string>context</string>
<string>source_person</string> <string>source_person</string>
<string>destination_decision_person</string> <string>destination_decision_person</string>
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
# This script check that necessary data exists on Order\n # This script check that necessary data exists on Order\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
order = state_change.object\n order = state_change[\'object\']\n
error_message = \'\'\n error_message = \'\'\n
message_list = []\n message_list = []\n
\n \n
...@@ -138,10 +138,11 @@ if len(message_list) > 0:\n ...@@ -138,10 +138,11 @@ if len(message_list) > 0:\n
<string>kw</string> <string>kw</string>
<string>Products.DCWorkflow.DCWorkflow</string> <string>Products.DCWorkflow.DCWorkflow</string>
<string>ValidationFailed</string> <string>ValidationFailed</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>order</string> <string>order</string>
<string>error_message</string> <string>error_message</string>
<string>message_list</string> <string>message_list</string>
<string>_getattr_</string>
<string>None</string> <string>None</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>line</string> <string>line</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>task = state_change.object\n <value> <string>task = state_change[\'object\']\n
\n \n
task.applyToOrderRelatedMovement(method_id=\'expand\')\n task.applyToOrderRelatedMovement(method_id=\'expand\')\n
</string> </value> </string> </value>
...@@ -114,8 +114,9 @@ task.applyToOrderRelatedMovement(method_id=\'expand\')\n ...@@ -114,8 +114,9 @@ task.applyToOrderRelatedMovement(method_id=\'expand\')\n
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>task</string> <string>task</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>task = state_change.object\n <value> <string>task = state_change[\'object\']\n
\n \n
previous_tag = task.getPath() + \'_firstUpdateAppliedRule\'\n previous_tag = task.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = task.getPath() + \'_expand\'\n expand_tag = task.getPath() + \'_expand\'\n
...@@ -120,8 +120,9 @@ delivery_builder.activate(activity=\'SQLQueue\',after_tag=expand_tag).build(expl ...@@ -120,8 +120,9 @@ delivery_builder.activate(activity=\'SQLQueue\',after_tag=expand_tag).build(expl
<value> <value>
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>task</string> <string>task</string>
<string>_getattr_</string>
<string>previous_tag</string> <string>previous_tag</string>
<string>expand_tag</string> <string>expand_tag</string>
<string>activate_kw</string> <string>activate_kw</string>
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>task = state_change.object\n <value> <string>task = state_change[\'object\']\n
\n \n
tag = task.getPath() + \'_firstUpdateAppliedRule\'\n tag = task.getPath() + \'_firstUpdateAppliedRule\'\n
activate_kw = {\'tag\':tag,\'priority\':3}\n activate_kw = {\'tag\':tag,\'priority\':3}\n
...@@ -117,8 +117,9 @@ task.activate(tag=tag).updateAppliedRule(rule_id = \'default_order_rule\',activa ...@@ -117,8 +117,9 @@ task.activate(tag=tag).updateAppliedRule(rule_id = \'default_order_rule\',activa
<tuple> <tuple>
<string>state_change</string> <string>state_change</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getitem_</string>
<string>task</string> <string>task</string>
<string>_getattr_</string>
<string>tag</string> <string>tag</string>
<string>activate_kw</string> <string>activate_kw</string>
</tuple> </tuple>
......
254 258
\ No newline at end of file \ 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