Commit b0c2106f authored by Sebastien Robin's avatar Sebastien Robin

modified getTotalInventory for Shrenik


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3960 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea376035
......@@ -88,8 +88,17 @@ class InventoryLine(DeliveryLine):
return self.getInventory()
else:
# Use MySQL
aggregate = self.InventoryLine_zGetTotal()[0]
return aggregate.total_inventory or 0.0
# There is no inventory column in mysql any more,
# is it required to add it again. It is only
# usefull for the user interface
# aggregate = self.InventoryLine_zGetTotal()[0]
# return aggregate.total_inventory or 0.0
total_quantity = 0.0
for cell in self.getCellValueList(base_id='movement'):
if cell.getInventory() is not None:
total_quantity += cell.getInventory()
return total_quantity
security.declareProtected(Permissions.AccessContentsInformation, 'getQuantity')
def getQuantity(self):
......
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