Commit 696b7d34 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

SoftwareRelease_viewUsableComputerList should ignore some cases

parent 2732f0be
...@@ -50,7 +50,17 @@ ...@@ -50,7 +50,17 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>return [x.getParentValue() for x in context.portal_catalog(software_release_url=context.getUrlString(), group_by="parent_uid")]\n <value> <string>software_installation_list = context.portal_catalog(url_string=context.getUrlString(),\n
portal_type=\'Software Installation\', validation_state=\'validated\')\n
computer_list = []\n
allocation_scope_list = [\'open/personal\', \'open/public\', \'open/frien\']\n
for software_installation in software_installation_list:\n
computer = software_installation.getAggregateValue()\n
if software_installation.getSlapState() == \'start_requested\' and \\\n
computer.getAllocationScope() in allocation_scope_list:\n
computer_list.append(computer)\n
\n
return computer_list\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -51,9 +51,11 @@ ...@@ -51,9 +51,11 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>list = []\n <value> <string>list = []\n
for si in context.portal_catalog(software_release_url=context.getUrlString(), group_by="parent_uid"):\n for si in context.portal_catalog(url_string=context.getUrlString(), portal_type=\'Software Installation\', validation_state=\'validated\'):\n
computer = si.getParentValue()\n computer = si.getAggregateValue()\n
if not computer.Computer_getSoftwareReleaseUsage(context.getUid()):\n if si.getSlapState() == \'start_requested\' and \\\n
not computer.Computer_getSoftwareReleaseUsage(context.getUid()) \\\n
and computer.getValidationState() == \'validated\':\n
list.append(computer)\n list.append(computer)\n
\n \n
return list\n return list\n
......
316 317
\ 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