Commit f2a17666 authored by Yoshinori Okuji's avatar Yoshinori Okuji

getTotalPrice should not raise an exception, even if getQuantity or getPrice returns None.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3179 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c256b32a
......@@ -142,7 +142,9 @@ class SupplyLine(DeliveryLine, Path):
"""
Returns the totals price for this line
"""
return self.getQuantity() * self.getPrice()
quantity = self.getQuantity() or 0.0
price = self.getPrice() or 0.0
return quantity * price
def _getPrice(self, context):
return 0.0
......
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