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

Finalise 0a34f141

Also deliver immediately.
parent 02726df6
...@@ -61,17 +61,18 @@ except AttributeError:\n ...@@ -61,17 +61,18 @@ except AttributeError:\n
# does not come from Order\n # does not come from Order\n
pass\n pass\n
\n \n
# Then, modify state\n comment = translateString(\'Automatic transition during build.\')\n
packing_list.Delivery_confirm()\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 \n
line = packing_list.contentValues(portal_type=\'Sale Packing List Line\')[0]\n line = packing_list.contentValues(portal_type=\'Sale Packing List Line\')[0]\n
portal = packing_list.getPortalObject()\n portal = packing_list.getPortalObject()\n
\n \n
if line.getResource() == portal.portal_preferences.getPreferredInstanceSetupResource():\n # Initialise causality workflow\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 packing_list.startBuilding()\n
</string> </value> </string> </value>
</item> </item>
......
31 32
\ No newline at end of file \ 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>_Access_contents_information_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_Python_Scripts_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_bindings_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_cache_settings_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_permissions_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_proxy_roles_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_properties_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Take_ownership_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_Undo_changes_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_View_History_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_View_management_screens_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Lock_items_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Unlock_items_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_access_Permission</string> </key>
<value>
<list>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Authenticated</string>
<string>Author</string>
<string>Manager</string>
<string>Member</string>
<string>Owner</string>
</list>
</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>select_dict= {\'delivery_uid\': None}\n
kw[\'select_dict\']=select_dict\n
kw[\'left_join_list\']=select_dict.keys()\n
kw[\'delivery_uid\']=None\n
kw[\'group_by\']=(\'uid\',)\n
if src__==0:\n
return context.portal_catalog(**kw)\n
else:\n
return context.portal_catalog(src__=1, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>src__=0, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibDeliveryBuilder_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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 515
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment