Commit 238fc8ad authored by Alexandre Boeglin's avatar Alexandre Boeglin

- replaced interaction workflow by new ones in workflow chains

- removed old interaction workflows (delivery_edit_workflow and packing_list_interaction_workflow)
- added container_interaction workflow to handle Containers separately
- renamed container_interaction_workflow edit transition to calculate_packing

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16833 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c3bd4460
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
</chain> </chain>
<chain> <chain>
<type>Container Cell</type> <type>Container Cell</type>
<workflow>edit_workflow, packing_list_interaction_workflow</workflow> <workflow>container_interaction_workflow, edit_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Container Line</type> <type>Container Line</type>
<workflow>packing_list_interaction_workflow, edit_workflow, trade_matrix_workflow</workflow> <workflow>edit_workflow, container_interaction_workflow, trade_matrix_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Delivery Cell</type> <type>Delivery Cell</type>
<workflow>packing_list_interaction_workflow, delivery_edit_workflow</workflow> <workflow>delivery_movement_simulation_interaction_workflow, delivery_movement_causality_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Delivery Rule</type> <type>Delivery Rule</type>
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
<type>Internal Packing List</type> <type>Internal Packing List</type>
<workflow>internal_packing_list_workflow, edit_workflow</workflow> <workflow>internal_packing_list_workflow, edit_workflow</workflow>
</chain> </chain>
<chain>
<type>Internal Packing List Cell</type>
<workflow>delivery_edit_workflow, packing_list_interaction_workflow</workflow>
</chain>
<chain> <chain>
<type>Internal Packing List Line</type> <type>Internal Packing List Line</type>
<workflow>edit_workflow, trade_matrix_workflow</workflow> <workflow>edit_workflow, trade_matrix_workflow</workflow>
...@@ -65,15 +61,15 @@ ...@@ -65,15 +61,15 @@
</chain> </chain>
<chain> <chain>
<type>Purchase Packing List</type> <type>Purchase Packing List</type>
<workflow>edit_workflow, delivery_edit_workflow, packing_list_interaction_workflow, packing_list_causality_workflow, packing_list_workflow, delivery_causality_interaction_workflow</workflow> <workflow>edit_workflow, delivery_simulation_interaction_workflow, packing_list_causality_workflow, packing_list_workflow, delivery_causality_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Purchase Packing List Cell</type> <type>Purchase Packing List Cell</type>
<workflow>delivery_edit_workflow, delivery_movement_causality_interaction_workflow</workflow> <workflow>delivery_movement_causality_interaction_workflow, delivery_movement_simulation_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Purchase Packing List Line</type> <type>Purchase Packing List Line</type>
<workflow>edit_workflow, trade_matrix_workflow, delivery_movement_causality_interaction_workflow, delivery_edit_workflow, packing_list_interaction_workflow</workflow> <workflow>delivery_movement_simulation_interaction_workflow, trade_matrix_workflow, delivery_movement_causality_interaction_workflow, edit_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Purchase Supply</type> <type>Purchase Supply</type>
...@@ -89,7 +85,7 @@ ...@@ -89,7 +85,7 @@
</chain> </chain>
<chain> <chain>
<type>Returned Sale Packing List</type> <type>Returned Sale Packing List</type>
<workflow>packing_list_workflow, edit_workflow</workflow> <workflow>edit_workflow, packing_list_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Sale Order</type> <type>Sale Order</type>
...@@ -105,15 +101,15 @@ ...@@ -105,15 +101,15 @@
</chain> </chain>
<chain> <chain>
<type>Sale Packing List</type> <type>Sale Packing List</type>
<workflow>packing_list_interaction_workflow, edit_workflow, delivery_edit_workflow, packing_list_container_workflow, packing_list_causality_workflow, packing_list_workflow, delivery_causality_interaction_workflow</workflow> <workflow>edit_workflow, packing_list_causality_workflow, delivery_causality_interaction_workflow, packing_list_workflow, packing_list_container_workflow, delivery_simulation_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Sale Packing List Cell</type> <type>Sale Packing List Cell</type>
<workflow>delivery_movement_causality_interaction_workflow, delivery_edit_workflow</workflow> <workflow>container_interaction_workflow, delivery_movement_causality_interaction_workflow, delivery_movement_simulation_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Sale Packing List Line</type> <type>Sale Packing List Line</type>
<workflow>delivery_edit_workflow, trade_matrix_workflow, delivery_movement_causality_interaction_workflow, packing_list_interaction_workflow, edit_workflow</workflow> <workflow>delivery_movement_simulation_interaction_workflow, trade_matrix_workflow, container_interaction_workflow, delivery_movement_causality_interaction_workflow, edit_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Sale Supply</type> <type>Sale Supply</type>
...@@ -121,7 +117,7 @@ ...@@ -121,7 +117,7 @@
</chain> </chain>
<chain> <chain>
<type>Sale Supply Line</type> <type>Sale Supply Line</type>
<workflow>supply_line_interaction_workflow, edit_workflow</workflow> <workflow>edit_workflow, supply_line_interaction_workflow</workflow>
</chain> </chain>
<chain> <chain>
<type>Sale Trade Condition</type> <type>Sale Trade Condition</type>
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/> <tuple>
<tuple/> <string>Products.ERP5.InteractionWorkflow</string>
<string>InteractionWorkflowDefinition</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -16,75 +19,44 @@ ...@@ -16,75 +19,44 @@
</value> </value>
</item> </item>
<item> <item>
<key> <string>actbox_category</string> </key> <key> <string>_objects</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value> <value>
<tuple/> <tuple/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>after_script_name</string> </key> <key> <string>_owner</string> </key>
<value> <value>
<tuple/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>creation_guard</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value> <value>
<none/> <none/>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>description</string> </key>
<value> <string>Container_delete</string> </value> <value> <string>This workflow updates the isPacked state of a packing list when containers are modified</string> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>groups</string> </key>
<value> <value>
<list> <tuple/>
<string>manage_beforeDelete</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>id</string> </key>
<value> <value> <string>container_interaction_workflow</string> </value>
<list>
<string>Container Cell</string>
<string>Container Line</string>
</list>
</value>
</item> </item>
<item> <item>
<key> <string>script_name</string> </key> <key> <string>manager_bypass</string> </key>
<value> <value> <int>0</int> </value>
<list>
<string>Container_activateUpdatePackingListState</string>
</list>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string>Container Interaction Workflow</string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/> <tuple>
<tuple/> <string>Products.ERP5.Interaction</string>
<string>InteractionDefinition</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -37,13 +40,13 @@ ...@@ -37,13 +40,13 @@
<key> <string>after_script_name</string> </key> <key> <string>after_script_name</string> </key>
<value> <value>
<list> <list>
<string>PackingList_updateAppliedRule</string> <string>DeliveryMovement_calculatePacking</string>
</list> </list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string>recalculate isPacked() state after a modification</string> </value>
</item> </item>
<item> <item>
<key> <string>guard</string> </key> <key> <string>guard</string> </key>
...@@ -53,7 +56,7 @@ ...@@ -53,7 +56,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>PackingList_edit</string> </value> <value> <string>calculate_packing</string> </value>
</item> </item>
<item> <item>
<key> <string>method_id</string> </key> <key> <string>method_id</string> </key>
...@@ -70,10 +73,7 @@ ...@@ -70,10 +73,7 @@
<item> <item>
<key> <string>portal_type_filter</string> </key> <key> <string>portal_type_filter</string> </key>
<value> <value>
<list> <none/>
<string>Purchase Packing List</string>
<string>Sale Packing List</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -68,13 +68,11 @@ ...@@ -68,13 +68,11 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># trigger the simulation update from the parent delivery\n <value> <string>delivery = state_change[\'object\'].getExplanationValue()\n
\n \n
if obj is None:\n if getattr(delivery, \'calculatePacking\', None) is not None:\n
delivery = sci[\'object\'].getParentValue()\n path_and_method_id = (delivery.getPath(), (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n
else:\n delivery.activate(after_path_and_method_id=path_and_method_id).calculatePacking()\n
delivery = obj\n
container.Delivery_UpdateSimulation(sci, delivery)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -91,7 +89,7 @@ container.Delivery_UpdateSimulation(sci, delivery)\n ...@@ -91,7 +89,7 @@ container.Delivery_UpdateSimulation(sci, delivery)\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>sci, obj=None</string> </value> <value> <string>state_change</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -111,19 +109,19 @@ container.Delivery_UpdateSimulation(sci, delivery)\n ...@@ -111,19 +109,19 @@ container.Delivery_UpdateSimulation(sci, delivery)\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>sci</string> <string>state_change</string>
<string>obj</string>
<string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>delivery</string> <string>delivery</string>
<string>container</string> <string>getattr</string>
<string>None</string>
<string>path_and_method_id</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -135,14 +133,12 @@ container.Delivery_UpdateSimulation(sci, delivery)\n ...@@ -135,14 +133,12 @@ container.Delivery_UpdateSimulation(sci, delivery)\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple>
<none/> <none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>DeliveryLine_UpdateSimulation</string> </value> <value> <string>DeliveryMovement_calculatePacking</string> </value>
</item> </item>
<item> <item>
<key> <string>warnings</string> </key> <key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5.Interaction</string>
<string>InteractionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>DeliveryCell_UpdateSimulation</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Update the simulation from the delivery when a delivery cell is edited</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DeliveryCell_edit_UpdateSimulation</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_set.*</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Delivery Cell</string>
<string>Invoice Cell</string>
<string>Pay Sheet Cell</string>
<string>Purchase Packing List Cell</string>
<string>Sale Packing List Cell</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5.Interaction</string>
<string>InteractionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>DeliveryLine_UpdateSimulation</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Update the simulation when a delivery line is edited</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DeliveryLine_edit_UpdateSimulation</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_set.*</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Accounting Transaction Line</string>
<string>Invoice Line</string>
<string>Pay Sheet Line</string>
<string>Pay Sheet Transaction Line</string>
<string>Purchase Invoice Transaction Line</string>
<string>Purchase Packing List Line</string>
<string>Sale Invoice Transaction Line</string>
<string>Sale Packing List Line</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5.Interaction</string>
<string>InteractionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Delivery_ReindexRelatedSimulationMovement</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>When a delivery\'s simulation_state changes, all related simulation movement must be reindexed to take into account this change. \r\n
\r\n
FIXME: reindexObjectSecurity is probably not optimal, it may launch unnecessary reindex ?</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_changeSimulationState_ReindexSimulation</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>plan</string>
<string>confirm</string>
<string>stop</string>
<string>deliver</string>
<string>start</string>
<string>setReady</string>
<string>order</string>
</list>
</value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Internal Packing List</string>
<string>Pay Sheet Transaction</string>
<string>Payment Transaction</string>
<string>Purchase Invoice Transaction</string>
<string>Purchase Packing List</string>
<string>Sale Invoice Transaction</string>
<string>Sale Packing List</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5.Interaction</string>
<string>InteractionDefinition</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Delivery_UpdateSimulation</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>updateAppliedRule and reindex "delivery related" simulation movement</string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_edit_UpdateSimulation</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_set.*</string>
<string>manage_delObject</string>
<string>deleteContent</string>
<string>_delObject</string>
<string>plan</string>
<string>confirm</string>
<string>start</string>
<string>setReady</string>
<string>order</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Pay Sheet Transaction</string>
<string>Purchase Invoice Transaction</string>
<string>Purchase Packing List</string>
<string>Sale Invoice Transaction</string>
<string>Sale Packing List</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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># trigger the simulation update from the parent line\n
line = sci[\'object\'].getParentValue()\n
container.DeliveryLine_UpdateSimulation(sci, line)\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>sci</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>sci</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>line</string>
<string>container</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>DeliveryCell_UpdateSimulation</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>"""\n
+-----+ +--------+\n
|Order| |Delivery| \n
+-----+ +--------+\n
| /\n
[AR] / \n
`--[SM] (1) \n
| \n
[AR] \n
`--[SM] (2)\n
| \n
...\n
\n
This script reindex simulation movements in (1), so that delivery builder select movement in (2)\n
with an up to date simulation state.\n
"""\n
\n
delivery = sci[\'object\']\n
LOG = lambda msg:delivery.log("delivery_edit_workflow.Delivery_ReindexRelatedSimulationMovement (%s)\\n" % (delivery.getPath()), msg)\n
LOG = lambda msg:None\n
\n
LOG(\'BEGIN\')\n
\n
for movement in delivery.getMovementList() : \n
for simulation_movement in movement.getDeliveryRelatedValueList() :\n
simulation_movement.recursiveReindexObject()\n
LOG(\'reindexing SM @%s\' % simulation_movement.getPath())\n
\n
LOG(\'END\')\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>sci</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>sci</string>
<string>_getitem_</string>
<string>delivery</string>
<string>LOG</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>movement</string>
<string>simulation_movement</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>Delivery_ReindexRelatedSimulationMovement</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>"""\n
This script is called automatically every time a delivery (Packing List, Invoice, etc)\n
is edited.\n
It is responsible of updating the applied rule\n
\n
"""\n
\n
if obj is None:\n
delivery = sci[\'object\']\n
else:\n
delivery = obj\n
\n
delivery_portal_type = delivery.getPortalType()\n
portal = sci.getPortal()\n
LOG = lambda msg:delivery.log("delivery_edit_workflow.Delivery_UpdateSimulation (%s)\\n" % (delivery.getPath()), msg)\n
LOG = lambda msg:None\n
\n
LOG(\'BEGIN\')\n
\n
\n
rule_by_ptype = {\n
\'Sale Invoice Transaction\' : \'default_invoice_rule\',\n
\'Pay Sheet Transaction\' : \'default_invoice_rule\',\n
\'Purchase Invoice Transaction\' : \'default_invoice_rule\',\n
\'Sale Packing List\' : \'default_delivery_rule\',\n
\'Purchase Packing List\' : \'default_delivery_rule\',\n
}\n
\n
PRIORITY = 3\n
previous_tag = delivery.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = delivery.getPath() + \'_expand\'\n
activate_kw = { \'tag\' : expand_tag\n
, \'priority\': PRIORITY\n
}\n
if rule_by_ptype.has_key(delivery_portal_type) : \n
delivery.activate(\n
after_tag=previous_tag,\n
tag = expand_tag,\n
priority=PRIORITY\n
).updateAppliedRule(rule_id = rule_by_ptype[delivery_portal_type],\n
activate_kw=activate_kw)\n
else : \n
LOG("no rule_id for %s, don\'t know how to updateAppliedRule" % delivery_portal_type)\n
\n
LOG(\'END\')\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>sci, obj=None</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>sci</string>
<string>obj</string>
<string>None</string>
<string>_getitem_</string>
<string>delivery</string>
<string>_getattr_</string>
<string>delivery_portal_type</string>
<string>portal</string>
<string>LOG</string>
<string>rule_by_ptype</string>
<string>PRIORITY</string>
<string>previous_tag</string>
<string>expand_tag</string>
<string>activate_kw</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_UpdateSimulation</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <tuple>
<tuple/> <string>Products.DCWorkflow.States</string>
<string>StateDefinition</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -31,13 +34,19 @@ ...@@ -31,13 +34,19 @@
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>edit</string> <string>calculate_packing</string>
<string>pack</string> <string>pack</string>
<string>update_quantity</string> <string>update_quantity</string>
<string>update_quantity_action</string> <string>update_quantity_action</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="StateDefinition" module="Products.DCWorkflow.States"/> <tuple>
<tuple/> <string>Products.DCWorkflow.States</string>
<string>StateDefinition</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -31,11 +34,17 @@ ...@@ -31,11 +34,17 @@
<key> <string>transitions</string> </key> <key> <string>transitions</string> </key>
<value> <value>
<tuple> <tuple>
<string>edit</string> <string>calculate_packing</string>
<string>miss</string> <string>miss</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>type_list</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
......
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/> <tuple>
<tuple/> <string>Products.DCWorkflow.Transitions</string>
<string>TransitionDefinition</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -43,7 +46,7 @@ ...@@ -43,7 +46,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>edit</string> </value> <value> <string>calculate_packing</string> </value>
</item> </item>
<item> <item>
<key> <string>new_state_id</string> </key> <key> <string>new_state_id</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Interaction" module="Products.ERP5.Interaction"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interactions</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Container_updatePackingListState</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Container_edit</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_set.*</string>
<string>manage_afterAdd</string>
<string>manage_afterClone</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Container Cell</string>
<string>Container Line</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingListContent_delete</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>manage_beforeDelete</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Delivery Cell</string>
<string>Purchase Packing List Line</string>
<string>Sale Packing List Line</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<list>
<string>PackingListContent_beforeDelete</string>
</list>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>PackingListContent_updatePackingListState</string>
</list>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingListContent_edit</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_set.*</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Delivery Cell</string>
<string>Purchase Packing List Line</string>
<string>Sale Packing List Line</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Scripts" module="Products.DCWorkflow.Scripts"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>scripts</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>packing_list_content = state_change[\'object\']\n
\n
packing_list_content.getExplanationValue().activate(after_path=packing_list_content.getPath()).edit()\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</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>_getitem_</string>
<string>packing_list_content</string>
<string>_getattr_</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>Container_activateUpdatePackingListState</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>packing_list_content = state_change[\'object\']\n
\n
#packing_list_content.immediateReindexObject()\n
#packing_list_content.getExplanationValue().edit()\n
packing_list_content.getExplanationValue().activate(after_path=packing_list_content.getPath()).edit()\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</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>_getitem_</string>
<string>packing_list_content</string>
<string>_getattr_</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>Container_updatePackingListState</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>packing_list_content = state_change[\'object\']\n
\n
# Clean simulation\n
simulation_movement_list = packing_list_content.getDeliveryRelatedValueList(\n
portal_type="Simulation Movement")\n
for simulation_movement in simulation_movement_list:\n
# Simulation movement have to be aggregated on a new Delivery.\n
simulation_movement.setDelivery(None)\n
\n
# packing_list = packing_list_content.getExplanationValue()\n
# packing_list_portal_type = packing_list.getPortalType()\n
# if packing_list_portal_type == \'Sale Packing List\':\n
# delivery_builder = packing_list.portal_deliveries.sale_packing_list_builder\n
# elif packing_list_portal_type == \'Purchase Packing List\':\n
# delivery_builder = packing_list.portal_deliveries.\\\n
# purchase_packing_list_builder\n
# \n
# delivery_builder.build(\n
# movement_relative_url_list=[x.getRelativeUrl() for x in\\\n
# simulation_movement_list],\n
# delivery_relative_url_list=[packing_list.getRelativeUrl()]\n
# )\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</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>_getitem_</string>
<string>packing_list_content</string>
<string>_getattr_</string>
<string>simulation_movement_list</string>
<string>_getiter_</string>
<string>simulation_movement</string>
<string>None</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>PackingListContent_beforeDelete</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>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
packing_list_content.activate().PackingListContent_updateAfterEdit()\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</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>_getitem_</string>
<string>packing_list_content</string>
<string>_getattr_</string>
<string>explanation_value</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>PackingListContent_updatePackingListState</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>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>
<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>_getitem_</string>
<string>packing_list</string>
<string>_getattr_</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>PackingList_updateAppliedRule</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Variables" module="Products.DCWorkflow.Variables"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>variables</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="Worklists" module="Products.DCWorkflow.Worklists"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_mapping</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>worklists</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
122 133
\ No newline at end of file \ No newline at end of file
Container Cell | container_interaction_workflow
Container Cell | edit_workflow Container Cell | edit_workflow
Container Cell | packing_list_interaction_workflow Container Line | container_interaction_workflow
Container Line | edit_workflow Container Line | edit_workflow
Container Line | packing_list_interaction_workflow
Container Line | trade_matrix_workflow Container Line | trade_matrix_workflow
Container | edit_workflow Container | edit_workflow
Delivery Cell | delivery_edit_workflow Delivery Cell | delivery_movement_causality_interaction_workflow
Delivery Cell | packing_list_interaction_workflow Delivery Cell | delivery_movement_simulation_interaction_workflow
Delivery Rule | edit_workflow Delivery Rule | edit_workflow
Discount | edit_workflow Discount | edit_workflow
Internal Packing List Cell | delivery_edit_workflow
Internal Packing List Cell | packing_list_interaction_workflow
Internal Packing List Line | edit_workflow Internal Packing List Line | edit_workflow
Internal Packing List Line | trade_matrix_workflow Internal Packing List Line | trade_matrix_workflow
Internal Packing List | edit_workflow Internal Packing List | edit_workflow
...@@ -28,18 +26,16 @@ Purchase Order Line | trade_matrix_workflow ...@@ -28,18 +26,16 @@ Purchase Order Line | trade_matrix_workflow
Purchase Order | edit_workflow Purchase Order | edit_workflow
Purchase Order | order_simulation_interaction_workflow Purchase Order | order_simulation_interaction_workflow
Purchase Order | order_workflow Purchase Order | order_workflow
Purchase Packing List Cell | delivery_edit_workflow
Purchase Packing List Cell | delivery_movement_causality_interaction_workflow Purchase Packing List Cell | delivery_movement_causality_interaction_workflow
Purchase Packing List Line | delivery_edit_workflow Purchase Packing List Cell | delivery_movement_simulation_interaction_workflow
Purchase Packing List Line | delivery_movement_causality_interaction_workflow Purchase Packing List Line | delivery_movement_causality_interaction_workflow
Purchase Packing List Line | delivery_movement_simulation_interaction_workflow
Purchase Packing List Line | edit_workflow Purchase Packing List Line | edit_workflow
Purchase Packing List Line | packing_list_interaction_workflow
Purchase Packing List Line | trade_matrix_workflow Purchase Packing List Line | trade_matrix_workflow
Purchase Packing List | delivery_causality_interaction_workflow Purchase Packing List | delivery_causality_interaction_workflow
Purchase Packing List | delivery_edit_workflow Purchase Packing List | delivery_simulation_interaction_workflow
Purchase Packing List | edit_workflow Purchase Packing List | edit_workflow
Purchase Packing List | packing_list_causality_workflow Purchase Packing List | packing_list_causality_workflow
Purchase Packing List | packing_list_interaction_workflow
Purchase Packing List | packing_list_workflow Purchase Packing List | packing_list_workflow
Purchase Supply Line | edit_workflow Purchase Supply Line | edit_workflow
Purchase Supply Line | supply_line_interaction_workflow Purchase Supply Line | supply_line_interaction_workflow
...@@ -55,19 +51,19 @@ Sale Order Line | trade_matrix_workflow ...@@ -55,19 +51,19 @@ Sale Order Line | trade_matrix_workflow
Sale Order | edit_workflow Sale Order | edit_workflow
Sale Order | order_simulation_interaction_workflow Sale Order | order_simulation_interaction_workflow
Sale Order | order_workflow Sale Order | order_workflow
Sale Packing List Cell | delivery_edit_workflow Sale Packing List Cell | container_interaction_workflow
Sale Packing List Cell | delivery_movement_causality_interaction_workflow Sale Packing List Cell | delivery_movement_causality_interaction_workflow
Sale Packing List Line | delivery_edit_workflow Sale Packing List Cell | delivery_movement_simulation_interaction_workflow
Sale Packing List Line | container_interaction_workflow
Sale Packing List Line | delivery_movement_causality_interaction_workflow Sale Packing List Line | delivery_movement_causality_interaction_workflow
Sale Packing List Line | delivery_movement_simulation_interaction_workflow
Sale Packing List Line | edit_workflow Sale Packing List Line | edit_workflow
Sale Packing List Line | packing_list_interaction_workflow
Sale Packing List Line | trade_matrix_workflow Sale Packing List Line | trade_matrix_workflow
Sale Packing List | delivery_causality_interaction_workflow Sale Packing List | delivery_causality_interaction_workflow
Sale Packing List | delivery_edit_workflow Sale Packing List | delivery_simulation_interaction_workflow
Sale Packing List | edit_workflow Sale Packing List | edit_workflow
Sale Packing List | packing_list_causality_workflow Sale Packing List | packing_list_causality_workflow
Sale Packing List | packing_list_container_workflow Sale Packing List | packing_list_container_workflow
Sale Packing List | packing_list_interaction_workflow
Sale Packing List | packing_list_workflow Sale Packing List | packing_list_workflow
Sale Supply Line | edit_workflow Sale Supply Line | edit_workflow
Sale Supply Line | supply_line_interaction_workflow Sale Supply Line | supply_line_interaction_workflow
......
delivery_edit_workflow container_interaction_workflow
internal_packing_list_workflow internal_packing_list_workflow
inventory_workflow inventory_workflow
order_workflow order_workflow
packing_list_causality_workflow packing_list_causality_workflow
packing_list_container_workflow packing_list_container_workflow
packing_list_interaction_workflow
packing_list_workflow packing_list_workflow
supply_line_interaction_workflow supply_line_interaction_workflow
trade_matrix_workflow trade_matrix_workflow
\ 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