Commit d33af598 authored by Romain Courteaud's avatar Romain Courteaud

Only changed code layout.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3589 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ed769103
...@@ -403,26 +403,30 @@ class SimulationTool (BaseTool): ...@@ -403,26 +403,30 @@ class SimulationTool (BaseTool):
+ list(self.getPortalCurrentInventoryStateList())) + list(self.getPortalCurrentInventoryStateList()))
return self.getInventory(**kw) return self.getInventory(**kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getInventoryList') security.declareProtected(Permissions.AccessContentsInformation,
def getInventoryList(self, src__=0, 'getInventoryList')
ignore_variation=0, standardise=0, omit_simulation=0, omit_input=0, omit_output=0, def getInventoryList(self, src__=0, ignore_variation=0, standardise=0,
selection_domain=None, selection_report=None, **kw) : omit_simulation=0, omit_input=0, omit_output=0,
selection_domain=None, selection_report=None, **kw):
""" """
Returns a list of inventories for a single or multiple resources on a single or multiple Returns a list of inventories for a single or multiple
nodes, grouped by resource, node, section, etc. Every line defines an inventory resources on a single or multiple nodes, grouped by resource,
value for a given group of resource, node, section. node, section, etc. Every line defines an inventory value for
a given group of resource, node, section.
NOTE: we may want to define a parameter so that we can select the kind of inventory NOTE: we may want to define a parameter so that we can select
statistics we want to display (ex. sum, average, cost, etc.) the kind of inventory statistics we want to display (ex. sum,
average, cost, etc.)
""" """
sql_kw = self._generateSQLKeywordDict(**kw) sql_kw = self._generateSQLKeywordDict(**kw)
return self.Resource_zGetInventoryList(
return self.Resource_zGetInventoryList(src__=src__, src__=src__, ignore_variation=ignore_variation,
ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, standardise=standardise, omit_simulation=omit_simulation,
omit_input=omit_input, omit_output=omit_output, omit_input=omit_input, omit_output=omit_output,
selection_domain=selection_domain, selection_report=selection_report, **sql_kw) selection_domain=selection_domain,
selection_report=selection_report, **sql_kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getCurrentInventoryList') security.declareProtected(Permissions.AccessContentsInformation,
'getCurrentInventoryList')
def getCurrentInventoryList(self, **kw): def getCurrentInventoryList(self, **kw):
""" """
Returns list of current inventory grouped by section or site Returns list of current inventory grouped by section or site
...@@ -430,13 +434,16 @@ class SimulationTool (BaseTool): ...@@ -430,13 +434,16 @@ class SimulationTool (BaseTool):
kw['simulation_state'] = self.getPortalCurrentInventoryStateList() kw['simulation_state'] = self.getPortalCurrentInventoryStateList()
return self.getInventoryList(**kw) return self.getInventoryList(**kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getFutureInventoryList') security.declareProtected(Permissions.AccessContentsInformation,
'getFutureInventoryList')
def getFutureInventoryList(self, **kw): def getFutureInventoryList(self, **kw):
""" """
Returns list of future inventory grouped by section or site Returns list of future inventory grouped by section or site
""" """
kw['simulation_state'] = tuple(list(self.getPortalFutureInventoryStateList()) kw['simulation_state'] = tuple(
+ list(self.getPortalReservedInventoryStateList()) + list(self.getPortalCurrentInventoryStateList())) list(self.getPortalFutureInventoryStateList()) +\
list(self.getPortalReservedInventoryStateList()) +\
list(self.getPortalCurrentInventoryStateList()))
return self.getInventoryList(**kw) return self.getInventoryList(**kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getInventoryStat') security.declareProtected(Permissions.AccessContentsInformation, 'getInventoryStat')
......
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