Commit f3d97eae authored by Łukasz Nowak's avatar Łukasz Nowak

Allow multiple computers access one hosting subscription.

In cases when hosting subscription is shared by many computer partitions,
which belongs to different computers all computers from this group need access
to this hosting subscription.
parent 567e4683
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># XXX For now, this script requires proxy manager\n <value> <string encoding="cdata"><![CDATA[
# XXX For now, this script requires proxy manager\n
\n \n
# base_category_list : list of category values we need to retrieve\n # base_category_list : list of category values we need to retrieve\n
# user_name : string obtained from getSecurityManager().getUser().getUserName() [NuxUserGroup]\n # user_name : string obtained from getSecurityManager().getUser().getUserName() [NuxUserGroup]\n
...@@ -70,19 +72,27 @@ movement_portal_type = "Sale Packing List Line"\n ...@@ -70,19 +72,27 @@ movement_portal_type = "Sale Packing List Line"\n
\n \n
portal = obj.getPortalObject()\n portal = obj.getPortalObject()\n
\n \n
movement = portal.portal_catalog.getResultValue(\n security_dict = {}\n
\n
parent_url_list = []\n
for movement in portal.portal_catalog(\n
portal_type=movement_portal_type,\n portal_type=movement_portal_type,\n
aggregate_uid=obj.getUid(),\n aggregate_uid=obj.getUid(),\n
simulation_state=portal.getPortalCurrentInventoryStateList() + portal.getPortalReservedInventoryStateList() + portal.getPortalTransitInventoryStateList(),\n simulation_state=portal.getPortalCurrentInventoryStateList() + portal.getPortalReservedInventoryStateList() + portal.getPortalTransitInventoryStateList(),\n
)\n ):\n
\n
if movement is not None:\n
item = movement.getAggregateValue(portal_type=item_portal_type)\n item = movement.getAggregateValue(portal_type=item_portal_type)\n
if item is not None:\n if item is not None:\n
category_list.append({"aggregate": [item.getParentValue().getRelativeUrl()]})\n parent_url = item.getParentValue().getRelativeUrl()\n
if parent_url not in parent_url_list:\n
parent_url_list.append(parent_url)\n
\n \n
if len(parent_url_list) > 0:\n
parent_url_list.sort()\n
category_list.append({"aggregate": parent_url_list})\n
return category_list\n return category_list\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
......
169 170
\ 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