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 @@
</item>
<item>
<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>
</item>
<item>
......
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>list = []\n
for si in context.portal_catalog(software_release_url=context.getUrlString(), group_by="parent_uid"):\n
computer = si.getParentValue()\n
if not computer.Computer_getSoftwareReleaseUsage(context.getUid()):\n
for si in context.portal_catalog(url_string=context.getUrlString(), portal_type=\'Software Installation\', validation_state=\'validated\'):\n
computer = si.getAggregateValue()\n
if si.getSlapState() == \'start_requested\' and \\\n
not computer.Computer_getSoftwareReleaseUsage(context.getUid()) \\\n
and computer.getValidationState() == \'validated\':\n
list.append(computer)\n
\n
return list\n
......
316
\ No newline at end of file
317
\ 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