Commit b6af0592 authored by Romain Courteaud's avatar Romain Courteaud

Display instances even if packing list is not indexed/build yet

parent 7dd6c0cc
...@@ -50,26 +50,17 @@ ...@@ -50,26 +50,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>subscription_item = context.getAggregateValue(portal_type="Hosting Subscription")\n <value> <string>portal = context.getPortalObject()\n
subscription_item = context.getAggregateValue(portal_type="Hosting Subscription")\n
\n \n
line_list = context.portal_catalog(\n line_list = context.portal_catalog(\n
portal_type="Sale Packing List Line",\n portal_type=["Sale Order Line", "Sale Packing List Line"],\n
resource_relative_url=context.portal_preferences.getPreferredInstanceSetupResource(),\n default_resource_uid=portal.restrictedTraverse(context.portal_preferences.getPreferredInstanceSetupResource()).getUid(),\n
aggregate_uid=subscription_item.getUid())\n default_aggregate_uid=subscription_item.getUid())\n
\n
order_line_list = context.portal_catalog( \n
portal_type="Sale Order Line",\n
resource_relative_url=context.portal_preferences.getPreferredInstanceSetupResource(),\n
aggregate_relative_url=subscription_item.getRelativeUrl(),\n
simulation_state="ordered")\n
\n
# XXX order line has to display (as order is under approval)\n
\n \n
portal_type_list = ["Software Instance", "Slave Instance"]\n portal_type_list = ["Software Instance", "Slave Instance"]\n
result = [x.getAggregateValue(portal_type=portal_type_list) for x in line_list]\n instance_dict = dict([(x.getAggregate(portal_type=portal_type_list), 0) for x in line_list])\n
result.extend([x.getAggregateValue(portal_type=portal_type_list) for x in order_line_list])\n return [portal.restrictedTraverse(x) for x in instance_dict.keys()]\n
# result.extend([x.getObject() for x in order_line_list])\n
return result\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
166 167
\ 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