Commit 8db467c9 authored by Sebastien Robin's avatar Sebastien Robin

added methods getProductionTotalQuantity and getConsumptionTotalQuantity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4383 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b7289eb0
......@@ -605,6 +605,25 @@ class Movement(XMLObject, Amount):
### XXX We should filter by portal type here
return self.getAggregateUidList()
# Helper methods to display total quantities as produced / consumed
security.declareProtected(Permissions.AccessContentsInformation,
'getProductionTotalQuantity')
def getProductionTotalQuantity(self):
"""
Return the produced quantity
"""
quantity = self.getTotalQuantity()
return self.getProductionQuantity(quantity=quantity)
security.declareProtected(Permissions.AccessContentsInformation,
'getConsumptionTotalQuantity')
def getConsumptionTotalQuantity(self):
"""
Return the produced quantity
"""
quantity = self.getTotalQuantity()
return self.getConsumptionQuantity(quantity=quantity)
# SKU vs. CU
# security.declareProtected(Permissions.AccessContentsInformation, 'getSourceStandardInventoriatedQuantity')
# def getSourceStandardInventoriatedQuantity(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