Commit 90fa6e8b authored by Łukasz Nowak's avatar Łukasz Nowak

Drop simulation related interaction.

Delivery can be stopped by user without enough privileges.

And ExpandableItem does not have to be immediately expanded, there is alarm which
is responsible for simulation tree updates.
parent e5b9c331
......@@ -28,7 +28,6 @@
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>SalePackingList_expandSubscription</string>
<string>SalePackingList_requestStoredSoftwareInstanceState</string>
</list>
</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>sale_packing_list = state_change[\'object\']\n
preference_tool = sale_packing_list.getPortalObject().portal_preferences\n
\n
sale_packing_list_line_list = sale_packing_list.getMovementList()\n
assert len(sale_packing_list_line_list) == 1\n
sale_packing_list_line = sale_packing_list_line_list[0]\n
resource = sale_packing_list_line.getResource()\n
if resource == preference_tool.getPreferredInstanceSetupResource():\n
subscription = sale_packing_list_line.getAggregateValue(portal_type=[\'Hosting Subscription\'])\n
\n
for open_order_line in subscription.getAggregateRelatedValueList(portal_type="Open Sale Order Line"):\n
if not open_order_line.hasSpecialise():\n
open_order_line.setSpecialise(sale_packing_list.getSpecialise())\n
# open_order = open_order_line.getParentValue()\n
# open_order.OpenSaleOrder_restrictMethodAsShadowUser(\n
# open_order=open_order,\n
# callable_object=open_order_line.setSpecialise,\n
# argument_list=[sale_packing_list.getSpecialise()])\n
\n
subscription.Delivery_updateSimulation()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SalePackingList_expandSubscription</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
688
\ No newline at end of file
689
\ 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