Commit 813277cc authored by Romain Courteaud's avatar Romain Courteaud

getTotalPrice and getTotalQuantity return 0 by default.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2799 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 438783b5
......@@ -562,7 +562,7 @@ class Delivery(XMLObject):
if src__:
return self.Delivery_zGetTotal(src__=1, **kw)
aggregate = self.Delivery_zGetTotal(**kw)[0]
return aggregate.total_price
return aggregate.total_price or 0
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalQuantity')
def getTotalQuantity(self, src__=0, **kw):
......@@ -574,7 +574,7 @@ class Delivery(XMLObject):
if src__:
return self.Delivery_zGetTotal(src__=1, **kw)
aggregate = self.Delivery_zGetTotal(**kw)[0]
return aggregate.total_quantity
return aggregate.total_quantity or 0
security.declareProtected(Permissions.AccessContentsInformation, 'getDeliveryUid')
def getDeliveryUid(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