Commit 8d6db017 authored by Łukasz Nowak's avatar Łukasz Nowak

Finalise 0a34f141

Also deliver immediately.
parent 02726df6
......@@ -61,17 +61,18 @@ except AttributeError:\n
# does not come from Order\n
pass\n
\n
# Then, modify state\n
packing_list.Delivery_confirm()\n
comment = translateString(\'Automatic transition during build.\')\n
if portal.portal_workflow.isTransitionPossible(context, \'confirm\'):\n
context.confirm(comment=comment)\n
if portal.portal_workflow.isTransitionPossible(context, \'start\'):\n
context.start(comment=comment)\n
context.stop(comment=comment)\n
context.deliver(comment=comment)\n
\n
line = packing_list.contentValues(portal_type=\'Sale Packing List Line\')[0]\n
portal = packing_list.getPortalObject()\n
\n
if line.getResource() == portal.portal_preferences.getPreferredInstanceSetupResource():\n
packing_list.activate(after_path_and_method_id=(packing_list.getPath(),\n
(\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).SalePackingList_deliverInstanceSetup()\n
\n
# First set the packing_list in the building state\n
# Initialise causality workflow\n
packing_list.startBuilding()\n
</string> </value>
</item>
......
31
\ No newline at end of file
32
\ No newline at end of file
<?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>from Products.ERP5Type.Message import translateString\n
if context.getPortalType() != \'Sale Packing List\':\n
raise TypeError(\'%r is not Sale Packing List\' % context.getPath())\n
line = context.contentValues(portal_type=\'Sale Packing List Line\')[0]\n
\n
portal = context.getPortalObject()\n
if line.getResource() != portal.portal_preferences.getPreferredInstanceSetupResource():\n
raise TypeError(\'%r is not Instance Setup Sale Packing List\' % context.getPath())\n
\n
comment = translateString(\'Automatic transition on setup delivery.\')\n
if portal.portal_workflow.isTransitionPossible(context, \'start\'):\n
context.start(comment=comment)\n
context.stop(comment=comment)\n
context.deliver(comment=comment)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SalePackingList_deliverInstanceSetup</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>if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n
packing_list = context\n
\n
try:\n
packing_list.PackingList_copyOrderProperties()\n
except AttributeError:\n
# does not come from Order\n
pass\n
\n
# Then, modify state\n
packing_list.Delivery_confirm()\n
\n
line = packing_list.contentValues(portal_type=\'Sale Packing List Line\')[0]\n
portal = packing_list.getPortalObject()\n
\n
if line.getResource() == portal.portal_preferences.getPreferredInstanceSetupResource():\n
packing_list.activate(after_path_and_method_id=(packing_list.getPath(),\n
(\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).SalePackingList_deliverInstanceSetup()\n
\n
# First set the packing_list in the building state\n
packing_list.startBuilding()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>related_simulation_movement_path_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibSalePackingList_postGeneration</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
514
\ No newline at end of file
515
\ 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