Commit 69425916 authored by Sebastien Robin's avatar Sebastien Robin

make getAvailableInventory working

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11296 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 68bdafff
...@@ -617,14 +617,12 @@ class SimulationTool (BaseTool): ...@@ -617,14 +617,12 @@ class SimulationTool (BaseTool):
def getAvailableInventory(self, **kw): def getAvailableInventory(self, **kw):
""" """
Returns available inventory Returns available inventory
(current inventory - reserved) (current inventory - reserved_inventory)
""" """
#XXX This code is wrong, look at current_inventory = self.getCurrentInventory(**kw)
# zope/Products/ERP5/Extensions/InventoryBrain.py for a more complete one kw['simulation_state'] = self.getPortalReservedInventoryStateList()
kw['simulation_state'] = tuple( reserved_inventory = self.getInventory(omit_input=1,**kw)
list(self.getPortalReservedInventoryStateList()) + \ return current_inventory+reserved_inventory
list(self.getPortalCurrentInventoryStateList()))
return self.getInventory(**kw)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getFutureInventory') 'getFutureInventory')
......
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