Commit 145d7e6d authored by Łukasz Nowak's avatar Łukasz Nowak

Support Software Instances without Sale Order Line related.

This is backward compatibility.
parent 3f94a16d
...@@ -66,14 +66,19 @@ if obj is None:\n ...@@ -66,14 +66,19 @@ if obj is None:\n
return []\n return []\n
\n \n
item_portal_type = "Hosting Subscription"\n item_portal_type = "Hosting Subscription"\n
movement_portal_type = "Sale Order Line"\n movement_portal_type = ["Sale Order Line"]\n
\n
# BBB: Supports for Software Instances without Sale Order Line\n
movement_portal_type.append("Sale Packing List Line")\n
\n \n
portal = obj.getPortalObject()\n portal = obj.getPortalObject()\n
\n \n
movement = portal.portal_catalog.getResultValue(\n movement = portal.portal_catalog.getResultValue(\n
portal_type=movement_portal_type,\n portal_type=movement_portal_type,\n
strict_aggregate_uid=obj.getUid(),\n strict_aggregate_uid=obj.getUid(),\n
simulation_state=(\'confirmed\', \'ordered\'),\n # simulation_state=(\'confirmed\', \'ordered\'), # BBB: State has no meaning\n
default_resource_uid=portal.restrictedTraverse(portal.portal_preferences.getPreferredInstanceSetupResource()).getUid(), # BBB: Resource is important\n
limit=1, # BBB: There shall be one and only one delivery line with setup resource\n
)\n )\n
\n \n
if movement is not None:\n if movement is not None:\n
......
391 392
\ 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