<?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>subscription_item = context.getAggregateValue(portal_type="Hosting Subscription")\n
\n
line_list =  context.portal_catalog(\n
  portal_type="Sale Packing List Line",\n
  resource_relative_url=context.portal_preferences.getPreferredInstanceSetupResource(),\n
  default_aggregate_uid=subscription_item.getUid())\n
\n
line_list = [x.getObject() for x in line_list]\n
\n
# Add also sale order under validation\n
line_list.extend([x.getObject() for x in context.portal_catalog(\n
  portal_type="Sale Order Line",\n
  resource_relative_url=context.portal_preferences.getPreferredInstanceSetupResource(),\n
  default_aggregate_uid=subscription_item.getUid())])\n
\n
for delivery_line in line_list:\n
  software_instance = delivery_line.getAggregateValue(portal_type=\'Software Instance\')\n
  if software_instance is not None:\n
    if software_instance.getPredecessorRelatedValue() is None:\n
      software_release = delivery_line.getAggregateValue(portal_type=\'Software Release\')\n
      if software_release is not None:\n
        software_product = software_release.getAggregateValue()\n
        return \'%s/index_html\' % software_product.getDefaultImageAbsoluteUrl()\n
</string> </value>
        </item>
        <item>
            <key> <string>_params</string> </key>
            <value> <string>**kw</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>OpenSaleOrderLine_getDefaultImageAbsoluteUrl</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
