[Erp5-report] r16287 - /erp5/trunk/products/ERP5/Document/Currency.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Sep 12 11:22:21 CEST 2007
Author: yo
Date: Wed Sep 12 11:22:20 2007
New Revision: 16287
URL: http://svn.erp5.org?rev=16287&view=rev
Log:
Add a method asNumericCode. This is easier than using a python script, because of the security management with proxy roles.
Modified:
erp5/trunk/products/ERP5/Document/Currency.py
Modified: erp5/trunk/products/ERP5/Document/Currency.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Currency.py?rev=16287&r1=16286&r2=16287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Currency.py (original)
+++ erp5/trunk/products/ERP5/Document/Currency.py Wed Sep 12 11:22:20 2007
@@ -71,3 +71,8 @@
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())
More information about the Erp5-report
mailing list