Commit e579378d authored by Jean-Paul Smets's avatar Jean-Paul Smets

*** empty log message ***


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4490 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b3b81744
......@@ -60,3 +60,16 @@ class Currency(Resource):
, PropertySheet.Resource
, PropertySheet.Reference
)
# Unit conversion
security.declareProtected(Permissions.AccessContentsInformation, 'convertQuantity')
def convertQuantity(self, quantity, from_unit, to_unit):
return quantity
security.declareProtected(Permissions.AccessContentsInformation, 'convertCurrency')
def convertCurrency(self, quantity, to_currency):
if to_currency is self:
return quantity
return quantity
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