Commit 40712505 authored by Aurel's avatar Aurel

use simulation state from item table in getTrackingList


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7463 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0e5d5093
......@@ -922,6 +922,11 @@ class SimulationTool (BaseTool):
new_kw.get('output')
new_kw['date_condition_in_join'] = not (new_kw.get('input') or new_kw.get('output'))
# Pass simulation state to request
if kw.has_key('item.simulation_state'):
new_kw['simulation_state_list'] = kw['item.simulation_state']
else:
new_kw['simulation_state_list'] = None
return self.Resource_zGetTrackingList(src__=src__,
selection_domain=selection_domain,
......@@ -933,7 +938,7 @@ class SimulationTool (BaseTool):
"""
Returns list of current inventory grouped by section or site
"""
kw['simulation_state'] = self.getPortalCurrentInventoryStateList()
kw['item.simulation_state'] = self.getPortalCurrentInventoryStateList()
return self.getTrackingList(**kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getFutureTrackingList')
......@@ -941,7 +946,7 @@ class SimulationTool (BaseTool):
"""
Returns list of future inventory grouped by section or site
"""
kw['simulation_state'] = tuple(list(self.getPortalFutureInventoryStateList())
kw['item.simulation_state'] = tuple(list(self.getPortalFutureInventoryStateList())
+ list(self.getPortalReservedInventoryStateList()) + list(self.getPortalCurrentInventoryStateList()))
return self.getTrackingList(**kw)
......
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