Commit 812c4615 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add a method asNumericCode. This is easier than using a python script, because...

Add a method asNumericCode. This is easier than using a python script, because of the security management with proxy roles.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16287 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c45fbced
......@@ -71,3 +71,8 @@ class Currency(Resource):
if to_currency is self:
return quantity
return quantity
security.declareProtected(Permissions.AccessContentsInformation, 'asNumericCode')
def asNumericCode(self):
"""Return a numeric code defined in ISO 4217."""
return self.Base_convertCurrencyCodeToNumericCode(self.getReference())
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