diff --git a/product/ERP5/Tool/SimulationTool.py b/product/ERP5/Tool/SimulationTool.py index b7cc31d130e687f5b5f9a7519d0f3d4e0e3ecb98..73d5bab6fa82012035348e46a3a67364a486873f 100644 --- a/product/ERP5/Tool/SimulationTool.py +++ b/product/ERP5/Tool/SimulationTool.py @@ -1021,6 +1021,10 @@ class SimulationTool(BaseTool): omit_simulation - doesn't take into account simulation movements + only_accountable - Only take into account accountable movements. By + default, only movements for which isAccountable() is + true will be taken into account. + omit_input - doesn't take into account movement with quantity > 0 omit_output - doesn't take into account movement with quantity < 0 @@ -1180,6 +1184,7 @@ class SimulationTool(BaseTool): def getInventoryList(self, src__=0, optimisation__=True, ignore_variation=0, standardise=0, omit_simulation=0, + only_accountable=True, default_stock_table='stock', selection_domain=None, selection_report=None, statistic=0, inventory_list=1, @@ -1412,6 +1417,7 @@ class SimulationTool(BaseTool): stock_table_id=EQUAL_DATE_TABLE_ID, src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, selection_domain=selection_domain, selection_report=selection_report, precision=precision, inventory_list=inventory_list, @@ -1424,6 +1430,7 @@ class SimulationTool(BaseTool): stock_table_id=GREATER_THAN_DATE_TABLE_ID, src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, selection_domain=selection_domain, selection_report=selection_report, precision=precision, inventory_list=inventory_list, @@ -1551,6 +1558,7 @@ class SimulationTool(BaseTool): stock_table_id=default_stock_table, src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, selection_domain=selection_domain, selection_report=selection_report, precision=precision, inventory_list=inventory_list, connection_id=connection_id, @@ -1832,7 +1840,8 @@ class SimulationTool(BaseTool): security.declareProtected(Permissions.AccessContentsInformation, 'getInventoryHistoryList') def getInventoryHistoryList(self, src__=0, ignore_variation=0, - standardise=0, omit_simulation=0, omit_input=0, + standardise=0, omit_simulation=0, + only_accountable=True, omit_input=0, omit_output=0, selection_domain=None, selection_report=None, precision=None, **kw): """ @@ -1848,6 +1857,7 @@ class SimulationTool(BaseTool): return self.Resource_getInventoryHistoryList( src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, omit_input=omit_input, omit_output=omit_output, selection_domain=selection_domain, selection_report=selection_report, precision=precision, @@ -1857,6 +1867,7 @@ class SimulationTool(BaseTool): 'getInventoryHistoryChart') def getInventoryHistoryChart(self, src__=0, ignore_variation=0, standardise=0, omit_simulation=0, + only_accountable=True, omit_input=0, omit_output=0, selection_domain=None, selection_report=None, precision=None, **kw): @@ -1872,6 +1883,7 @@ class SimulationTool(BaseTool): return self.Resource_getInventoryHistoryChart( src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, omit_input=omit_input, omit_output=omit_output, selection_domain=selection_domain, selection_report=selection_report, precision=precision, @@ -1882,6 +1894,7 @@ class SimulationTool(BaseTool): def getMovementHistoryList(self, src__=0, ignore_variation=0, standardise=0, omit_simulation=0, omit_input=0, omit_output=0, + only_accountable=True, omit_asset_increase=0, omit_asset_decrease=0, selection_domain=None, selection_report=None, initial_running_total_quantity=0, @@ -1901,6 +1914,7 @@ class SimulationTool(BaseTool): src__=src__, ignore_variation=ignore_variation, standardise=standardise, omit_simulation=omit_simulation, + only_accountable=only_accountable, omit_input=omit_input, omit_output=omit_output, omit_asset_increase=omit_asset_increase, omit_asset_decrease=omit_asset_decrease, @@ -1915,7 +1929,8 @@ class SimulationTool(BaseTool): security.declareProtected(Permissions.AccessContentsInformation, 'getMovementHistoryStat') def getMovementHistoryStat(self, src__=0, ignore_variation=0, - standardise=0, omit_simulation=0, omit_input=0, + standardise=0, omit_simulation=0, + only_accountable=True, omit_input=0, omit_output=0, selection_domain=None, selection_report=None, precision=None, **kw): """ @@ -1925,9 +1940,10 @@ class SimulationTool(BaseTool): sql_kw = self._generateSQLKeywordDict(**kw) return self.Resource_zGetInventory(src__=src__, ignore_variation=ignore_variation, standardise=standardise, - omit_simulation=omit_simulation, omit_input=omit_input, - omit_output=omit_output, selection_domain=selection_domain, - selection_report=selection_report, precision=precision, **sql_kw) + omit_simulation=omit_simulation, only_accountable=only_accountable, + omit_input=omit_input, omit_output=omit_output, + selection_domain=selection_domain, selection_report=selection_report, + precision=precision, **sql_kw) security.declareProtected(Permissions.AccessContentsInformation, 'getNextNegativeInventoryDate')