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