Commit 9d8d3558 authored by Sebastien Robin's avatar Sebastien Robin

inventories: make getMovementHistoryStat using getInventoryList

Like this we stop using Resource_zGetInventory which is less
and less used. Indeed, it's better to only have Resource_zGetInventoryList
and sometimes returns a list of a single line.
parent 6277cab2
...@@ -2036,22 +2036,18 @@ class SimulationTool(BaseTool): ...@@ -2036,22 +2036,18 @@ class SimulationTool(BaseTool):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getMovementHistoryStat') 'getMovementHistoryStat')
def getMovementHistoryStat(self, src__=0, ignore_variation=0, def getMovementHistoryStat(self, src__=0, **kw):
standardise=0, omit_simulation=0,
only_accountable=True, omit_input=0,
omit_output=0, selection_domain=None,
selection_report=None, precision=None, **kw):
""" """
getMovementHistoryStat is the pending to getMovementHistoryList getMovementHistoryStat is the pending to getMovementHistoryList
for ListBox stat for ListBox stat
supported parameters are similar to ones accepted by getInventoryList
with the exception of group_by_*
""" """
sql_kw = self._generateSQLKeywordDict(**kw) sql_kw = self._generateSQLKeywordDict(**kw)
return self.Resource_zGetInventory(src__=src__, inventory_list = self.getInventoryList(ignore_group_by=1, **kw)
ignore_variation=ignore_variation, standardise=standardise, assert len(inventory_list) == 1
omit_simulation=omit_simulation, only_accountable=only_accountable, return inventory_list[0]
omit_input=omit_input, omit_output=omit_output,
selection_domain=selection_domain, selection_report=selection_report,
precision=precision, **sql_kw)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getNextNegativeInventoryDate') 'getNextNegativeInventoryDate')
......
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