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): ...@@ -198,13 +198,13 @@ class Amount(Base, Variated):
resource_quantity_unit = None resource_quantity_unit = None
return resource_quantity_unit return resource_quantity_unit
security.declareProtected(Permissions.AccessContentsInformation, 'getResourceUnitBasePrice') security.declareProtected(Permissions.AccessContentsInformation, 'getResourcePrice')
def getResourceUnitBasePrice(self): def getResourcePrice(self):
""" """
Return default quantity unit of the resource Return default quantity unit of the resource
""" """
resource = self.getResourceValue() resource = self.getResourceValue()
unit_base_price = resource.getUnitBasePrice(context=self) unit_base_price = resource.getPrice(context=self)
return unit_base_price return unit_base_price
...@@ -226,13 +226,13 @@ class Amount(Base, Variated): ...@@ -226,13 +226,13 @@ class Amount(Base, Variated):
return duration return duration
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalBasePrice') security.declareProtected(Permissions.AccessContentsInformation, 'getTotalBasePrice')
def getTotalBasePrice(self): def getTotalPrice(self):
""" """
Return duration in minute Return duration in minute
""" """
try: try:
efficiency = self.getEfficiency() efficiency = self.getEfficiency()
return self.getResourceUnitBasePrice() * self.getConvertedQuantity() / efficiency return self.getResourcePrice() * self.getConvertedQuantity() / efficiency
except: except:
return None 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