Commit 5ce62250 authored by Jérome Perrin's avatar Jérome Perrin

fix getPrice for DeliveryBuilder

WARNING: currency conversion is not yet implemented


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3400 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f583ef90
......@@ -196,7 +196,7 @@ Une ligne tarifaire."""
# Pricing in standard currency
security.declareProtected(Permissions.AccessContentsInformation, 'getPrice')
def getPrice(self):
def getPrice(self, context=None):
"""
The inventoriated quantity converted in a default unit
......@@ -207,9 +207,15 @@ Une ligne tarifaire."""
"""
result = self.getInventoriatedQuantity()
resource = self.getResourceValue()
if resource is None :
LOG('AccountingTransactionLine.getPrice()', 100,
'no resource for %s'%(self.getPath()))
source = self.getSourceValue()
if source is not None and resource is not None:
# XXX convertCurrency is not defined
# ... so for now, we return 1
return 1
return resource.convertCurrency(result, source.getPriceCurrencyValue())
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