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

- revert 45036, as the newest packing list with given state shall work


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