Commit 2f38fa4f authored by Julien Muchembled's avatar Julien Muchembled

Remove most disguised interactions related to simulation

parent 0da22035
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>delivery = state_change[\'object\']\n
delivery.Delivery_expandAndBuild()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_Build</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>state_change[\'object\'].Delivery_updateSimulation()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_updateSimulation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -24,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Delivery_Build</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Delivery_updateSimulation</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Delivery_Build</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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
Builds the delivery.\n
"""\n
from Products.ERP5Type.Log import log\n
delivery = sci[\'object\']\n
delivery_portal_type = delivery.getPortalType()\n
portal_deliveries = sci.getPortal().portal_deliveries\n
\n
builder_by_ptype = {\n
\'Sale Invoice\' : \'advanced_sale_invoice_transaction_builder\',\n
\'Purchase Invoice\' : \'advanced_purchase_invoice_transaction_builder\',\n
}\n
\n
if builder_by_ptype.has_key(delivery_portal_type) :\n
builder = getattr(portal_deliveries, builder_by_ptype[delivery_portal_type], None)\n
if builder is None :\n
log(\'erp5_advanced_invoicing\',\n
\'unable to build : no builder in %s\' % builder_by_ptype[delivery_portal_type])\n
return\n
\n
# build accounting lines\n
method_id_list = (\'expand\', \'edit\', \'updateAppliedRule\', \'Delivery_updateAppliedRule\',\n
\'immediateReindexObject\', \'recursiveImmediateReindexObject\')\n
\n
explanation_uid_list = [delivery.getUid(), ]\n
packing_list = delivery.getCausalityValue(\n
portal_type=(\'Sale Packing List\',\n
\'Purchase Packing List\'))\n
if packing_list is not None:\n
explanation_uid_list.append(packing_list.getUid())\n
order = packing_list.getCausalityValue(\n
portal_type=(\'Sale Order\',\n
\'Purchase Order\'))\n
if order is not None:\n
explanation_uid_list.append(order.getUid())\n
\n
\n
tag = \'invoice_transaction_build_%s\' % delivery.getRelativeUrl()\n
builder.activate(\n
activity=\'SQLQueue\',\n
after_method_id=method_id_list,\n
tag=tag,\n
activate_kw=dict(tag=tag)).build(activate_kw=dict(tag=tag),\n
explanation_uid=explanation_uid_list)\n
\n
# build related payment transactions\n
portal_deliveries.payment_transaction_builder.activate(\n
activity=\'SQLQueue\',\n
after_method_id=method_id_list).build(explanation_uid=explanation_uid_list)\n
\n
# set the object in building state.\n
delivery.startBuilding()\n
delivery.activate(after_tag=tag).updateCausalityState()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>sci</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_Build</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>invoice = state_change[\'object\']\n
invoice_path = invoice.getPath()\n
path_and_method_id = (invoice_path, (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n
expand_tag = invoice_path + \'_expand\'\n
tag = invoice_path + \'_updateAppliedRule\'\n
\n
priority = 3\n
\n
activate_kw = { \n
\'tag\': expand_tag,\n
\'priority\': priority,\n
}\n
invoice.activate(\n
after_path_and_method_id=path_and_method_id,\n
after_tag=expand_tag,\n
tag=tag,\n
priority=priority,\n
).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_createRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Delivery_createRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Delivery_Build</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -53,12 +53,11 @@
<value> <string>delivery = state_change[\'object\']\n
\n
portal = delivery.getPortalObject()\n
solver_tool = getattr(portal, \'portal_solvers\', None)\n
solver_process_tool = getattr(portal, \'portal_solver_processes\', None)\n
\n
if solver_tool is None or solver_process_tool is None:\n
try:\n
portal.portal_solvers\n
portal.portal_solver_processes\n
except AttributeError:\n
delivery.diverge()\n
return\n
else:\n
solver_tag = \'%s_solve\' % delivery.getPath()\n
delivery.activate(tag=solver_tag).Delivery_solveDivergenceAutomatically()\n
......
......@@ -124,19 +124,9 @@ if invoice.getSimulationState() == \'draft\':\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_confirm()\n
else:\n
# call builder just same as after script of \'confirm\' transition\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=confirm_tag).Delivery_expandAndBuild()\n
\n
# First set the invoice in the building state on the causality workflow\n
invoice.startBuilding()\n
\n
# Then an activity should put the causality state in diverged or solved\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
after_tag=confirm_tag).updateCausalityState()\n
]]></string> </value>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>order = state_change[\'object\']\n
\n
order.applyToOrderRelatedMovement(method_id=\'expand\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_appliedToRelatedMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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[
order = state_change[\'object\']\n
business_process = order.getSpecialiseValue()\n
\n
# When a business process is selected as specialise, ProductionOrderModelRule can be used.\n
# But another one is selected, ProductionOrderRule is still used.\n
if (business_process is not None and\n
business_process.getPortalType() in context.getPortalBusinessProcessTypeList()):\n
rule_reference=\'default_production_order_model_rule\'\n
builder_list = []\n
for path in business_process.getBuildablePathValueList(order):\n
builder_list.extend(path.getDeliveryBuilderValueList())\n
else:\n
rule_reference=\'default_production_order_rule\'\n
builder_list = [\n
order.portal_deliveries.production_report_builder,\n
order.portal_deliveries.production_packing_list_builder\n
]\n
\n
order_path = order.getPath()\n
tag = order_path + \'_updateAppliedRule\'\n
expand_tag = order_path + \'_expand\'\n
activate_kw = {\'tag\':expand_tag, \'priority\':3}\n
order.activate(tag=tag, after_tag=expand_tag).updateAppliedRule(rule_reference=rule_reference, activate_kw=activate_kw)\n
\n
for i in xrange(len(builder_list)):\n
if i > 0:\n
after_tag = (tag, expand_tag, \'%s_builder_%s\' % (order_path, i-1))\n
else:\n
after_tag = (tag, expand_tag)\n
builder_list[i].activate(\n
activity=\'SQLQueue\',\n
after_tag=after_tag,\n
tag=\'%s_builder_%s\' % (order_path, i),\n
priority=3).build(explanation_uid=order.getUid(),\n
activate_kw=activate_kw)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_buildPackingList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>order = state_change[\'object\']\n
business_process = order.getSpecialiseValue()\n
\n
# When a business process is selected as specialise, ProductionOrderModelRule can be used.\n
# But another one is selected, ProductionOrderRule is still used.\n
if (business_process is not None and\n
business_process.getPortalType() in context.getPortalBusinessProcessTypeList()):\n
rule_reference=\'default_production_order_model_rule\'\n
else:\n
rule_reference=\'default_production_order_rule\'\n
\n
path = order.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
activate_kw = {\'tag\':expand_tag, \'priority\':3}\n
order.activate(tag=tag, after_tag=expand_tag).updateAppliedRule(rule_reference=rule_reference, activate_kw=activate_kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_createOrderRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_appliedToRelatedMovement</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_buildPackingList</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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
\n
activate_kw = {}\n
related_order = packing_list.getCausalityValue()\n
path = packing_list.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
activate_kw = {\'tag\':expand_tag,\'priority\':3}\n
after_tag_list = [expand_tag]\n
if related_order is not None:\n
# XXX is it really required?\n
after_tag_list.append(\'%s_expand\' % related_order.getPath())\n
\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
priority=3).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
\n
\n
# Make sure to reindex related simulation movement if we are already\n
# simulated, call reindexObject, not immediateReindexObject so that\n
# catalogObjectList will be called with many objects\n
# XXX is it really required?\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
priority=3).applyToDeliveryRelatedMovement(method_id=\'reindexObject\')\n
\n
if packing_list.getCausalityState() == \'draft\':\n
packing_list.startBuilding()\n
# XXX is it really required?\n
packing_list.activate(\n
after_tag = tag,\n
).updateCausalityState()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>LOG=lambda msg:context.log("TaskReport_buildInvoice", msg)\n
\n
packing_list = sci[\'object\']\n
delivery_tool = sci.getPortal().portal_deliveries\n
LOG("Task Report : %s"%packing_list.getPath())\n
\n
if hasattr(sci.getPortal(), \'accounting_module\'):\n
if hasattr(delivery_tool, \'task_invoice_builder\'):\n
delivery_tool.task_invoice_builder.activate(\n
after_method_id = [ \'expand\', \n
\'recursiveImmediateReindexObject\',\n
\'immediateReindexObject\' ],\n
).build()\n
else :\n
packing_list.log("ERP5 Simulation",\n
"Unable to build Invoice from Task Report at %s "\\\n
": no task_invoice_builder" % packing_list.getPath())\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>sci</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingList_buildInvoice</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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
\n
activate_kw = {}\n
related_order = packing_list.getCausalityValue()\n
path = packing_list.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
activate_kw = {\'tag\':expand_tag,\'priority\':3}\n
after_tag_list = [expand_tag]\n
if related_order is not None:\n
# XXX is it really required?\n
after_tag_list.append(\'%s_expand\' % related_order.getPath())\n
\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
priority=3).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
\n
\n
# Make sure to reindex related simulation movement if we are already\n
# simulated, call reindexObject, not immediateReindexObject so that\n
# catalogObjectList will be called with many objects\n
# XXX is it really required?\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
priority=3).applyToDeliveryRelatedMovement(method_id=\'reindexObject\')\n
\n
if packing_list.getCausalityState() == \'draft\':\n
packing_list.startBuilding()\n
# XXX is it really required?\n
packing_list.activate(\n
after_tag = tag,\n
).updateCausalityState()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -74,8 +74,6 @@ Please look at this URL:\n
task_report.ERP5Site_getAbsoluteUrl(), task_report.getRelativeUrl())\n
portal.portal_notifications.sendMessage(sender=source_person, recipient=destination_decision_person,\n
subject="Task Report Finished", message=message)\n
\n
container.PackingList_updateAppliedRule(state_change)\n
</string> </value>
</item>
<item>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Confirm Task</string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Start Task</string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>task = state_change[\'object\']\n
\n
task.applyToOrderRelatedMovement(method_id=\'expand\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Task_appliedToRelatedMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>task = state_change[\'object\']\n
\n
path = task.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
activate_kw = {\'tag\':expand_tag, \'priority\':3}\n
\n
task.activate(tag=tag, after_tag=expand_tag).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
\n
delivery_builder = task.portal_deliveries.task_report_builder\n
delivery_builder.activate(activity=\'SQLQueue\',after_tag=(tag, expand_tag)).build(explanation_uid=task.getUid())\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Task_buildTaskReport</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>task = state_change[\'object\']\n
\n
path = task.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
activate_kw = {\'tag\':expand_tag, \'priority\':3}\n
\n
task.activate(tag=tag, after_tag=expand_tag).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Task_createOrderRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Cancel Task</string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Task_appliedToRelatedMovement</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Confirm Task</string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Task_buildTaskReport</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Order Task</string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Task_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Plan Task</string> </value>
......@@ -42,7 +46,7 @@
</item>
<item>
<key> <string>script_name</string> </key>
<value> <string>Task_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>return context.asComposedDocument().build(explanation=context)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_buildOnComposedDocument</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>delivery = context\n
delivery_path = delivery.getPath()\n
path_and_method_id = (delivery_path, (\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))\n
expand_tag = delivery_path + \'_expand\'\n
tag = delivery_path + \'_updateAppliedRule\'\n
after_tag = [expand_tag]\n
\n
# wait for expand activities of related documents.\n
# XXX ideally, it should be calculated by explanation tree, instead of causalities.\n
for causality in delivery.getCausalityValueList():\n
causality_path = causality.getPath()\n
after_tag.append(\'%s_expand\' % causality_path)\n
after_tag.append(\'%s_updateAppliedRule\' % causality_path)\n
\n
priority = 3\n
activate_kw = { \n
\'tag\': expand_tag,\n
\'priority\':priority,\n
}\n
delivery.activate(\n
activity=\'SQLQueue\',\n
after_path_and_method_id=path_and_method_id,\n
after_tag=after_tag,\n
tag=tag,\n
priority=priority,\n
serialization_tag=tag,\n
).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
delivery.activate(activity=\'SQLQueue\', after_tag=(tag, expand_tag)).Delivery_buildOnComposedDocument()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_expandAndBuild</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>order = state_change[\'object\']\n
\n
order.applyToOrderRelatedMovement(method_id=\'expand\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_appliedToRelatedMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>order = state_change[\'object\']\n
order.Delivery_updateSimulation()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Order_createOrderRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -24,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>Order_createOrderRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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
\n
activate_kw = {}\n
related_order = packing_list.getCausalityValue()\n
path = packing_list.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
path_and_method_id = (path, (\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))\n
activate_kw = {\'tag\':expand_tag,\'priority\':3}\n
after_tag_list = [expand_tag]\n
if related_order is not None:\n
related_order_path = related_order.getPath()\n
after_tag_list.append(\'%s_expand\' % related_order_path)\n
after_tag_list.append(\'%s_updateAppliedRule\' % related_order_path)\n
\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
after_path_and_method_id=path_and_method_id,\n
priority=3).Delivery_updateAppliedRule(activate_kw=activate_kw)\n
\n
\n
# Make sure to reindex related simulation movement if we are already\n
# simulated, call reindexObject, not immediateReindexObject so that\n
# catalogObjectList will be called with many objects\n
# XXX is it really required?\n
packing_list.activate(after_tag=after_tag_list,\n
tag=tag,\n
after_path_and_method_id=path_and_method_id,\n
priority=3).applyToDeliveryRelatedMovement(method_id=\'reindexObject\')\n
\n
if packing_list.getCausalityState() == \'draft\':\n
packing_list.startBuilding()\n
# XXX is it really required?\n
packing_list.activate(\n
after_tag = tag,\n
).updateCausalityState()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -10,6 +10,10 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
......@@ -20,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -24,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -24,7 +24,7 @@
</item>
<item>
<key> <string>after_script_name</string> </key>
<value> <string>PackingList_updateAppliedRule</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
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