Commit 9e8a0256 authored by Łukasz Nowak's avatar Łukasz Nowak

- no state at all shall be taken while looking for packing list for software

   instance, as the newest packing list state selects its state and conditions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45036 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c130f37b
...@@ -415,7 +415,6 @@ class SlapTool(BaseTool): ...@@ -415,7 +415,6 @@ class SlapTool(BaseTool):
elif movement.getResource() == \ elif movement.getResource() == \
portal_preferences.getPreferredInstanceCleanupResource(): portal_preferences.getPreferredInstanceCleanupResource():
if movement.getSimulationState() in ('confirmed', 'started', 'stopped'): if movement.getSimulationState() in ('confirmed', 'started', 'stopped'):
slap_partition._need_modification = 1 slap_partition._need_modification = 1
...@@ -721,25 +720,14 @@ class SlapTool(BaseTool): ...@@ -721,25 +720,14 @@ class SlapTool(BaseTool):
service = portal.restrictedTraverse(service_relative_url) service = portal.restrictedTraverse(service_relative_url)
service_uid_list.append(service.getUid()) service_uid_list.append(service.getUid())
# Get associated software release
state_list = []
state_list.extend(portal.getPortalCurrentInventoryStateList())
state_list.extend(portal.getPortalReservedInventoryStateList())
state_list.extend(portal.getPortalTransitInventoryStateList())
# Use getTrackingList # Use getTrackingList
catalog_result = portal.portal_catalog( return portal.portal_catalog.getResultValue(
portal_type='Sale Packing List Line', portal_type='Sale Packing List Line',
simulation_state=state_list,
aggregate_relative_url=computer_partition_document.getRelativeUrl(), aggregate_relative_url=computer_partition_document.getRelativeUrl(),
default_resource_uid=service_uid_list, default_resource_uid=service_uid_list,
sort_on=(('movement.start_date', 'DESC'),), sort_on=(('movement.start_date', 'DESC'),),
limit=1, limit=1,
) )
if len(catalog_result):
return catalog_result[0].getObject()
else:
return None
def _reportComputerUsage(self, computer, usage): def _reportComputerUsage(self, computer, usage):
"""Stores usage report of a computer.""" """Stores usage report of a computer."""
......
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