Commit 6db77822 authored by Romain Courteaud's avatar Romain Courteaud

Change base price reference to price.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2663 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a250eeee
......@@ -198,13 +198,13 @@ class Amount(Base, Variated):
resource_quantity_unit = None
return resource_quantity_unit
security.declareProtected(Permissions.AccessContentsInformation, 'getResourceUnitBasePrice')
def getResourceUnitBasePrice(self):
security.declareProtected(Permissions.AccessContentsInformation, 'getResourcePrice')
def getResourcePrice(self):
"""
Return default quantity unit of the resource
"""
resource = self.getResourceValue()
unit_base_price = resource.getUnitBasePrice(context=self)
unit_base_price = resource.getPrice(context=self)
return unit_base_price
......@@ -226,13 +226,13 @@ class Amount(Base, Variated):
return duration
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalBasePrice')
def getTotalBasePrice(self):
def getTotalPrice(self):
"""
Return duration in minute
"""
try:
efficiency = self.getEfficiency()
return self.getResourceUnitBasePrice() * self.getConvertedQuantity() / efficiency
return self.getResourcePrice() * self.getConvertedQuantity() / efficiency
except:
return None
......
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