Commit 8e94c702 authored by Vincent Pelletier's avatar Vincent Pelletier

"total_quantity" and "inventory" are alias for the same calculation in...

"total_quantity" and "inventory" are alias for the same calculation in inventory request. Always use "total_quantity" so that "inventory" can be removed in the future.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15522 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 41901366
...@@ -765,7 +765,7 @@ class SimulationTool(BaseTool): ...@@ -765,7 +765,7 @@ class SimulationTool(BaseTool):
if len(result) > 0: if len(result) > 0:
if len(result) != 1: if len(result) != 1:
raise ValueError, 'Sorry we must have only one' raise ValueError, 'Sorry we must have only one'
inventory = result[0].inventory inventory = result[0].total_quantity
if inventory is not None: if inventory is not None:
total_result = inventory total_result = inventory
...@@ -937,7 +937,7 @@ class SimulationTool(BaseTool): ...@@ -937,7 +937,7 @@ class SimulationTool(BaseTool):
if src__ : if src__ :
return result return result
return map(lambda r: (r.node_title, r.inventory), result) return map(lambda r: (r.node_title, r.total_quantity), result)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getCurrentInventoryChart') 'getCurrentInventoryChart')
......
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