[Erp5-report] r13962 - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins/erp5_bas...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 5 10:43:43 CEST 2007
Author: vincent
Date: Thu Apr 5 10:43:41 2007
New Revision: 13962
URL: http://svn.erp5.org?rev=13962&view=rev
Log:
Handle the case where from_currency and to_currency are the same.
Modified:
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml
erp5/trunk/bt5/erp5_base/bt/revision
Modified: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml?rev=13962&r1=13961&r2=13962&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml Thu Apr 5 10:43:41 2007
@@ -73,6 +73,12 @@
# This script will calculate the exchange value for the current\n
# context. If to_currency is provided, then instead of using\n
# the context, it will generate a temp object.\n
+\n
+# Handle the case where from_currency is to_currency\n
+# Assumes that 2 currencies with the same ID, they are the same currency\n
+if from_currency is not None and to_currency is not None and \\\n
+ [x for x in from_currency.split(\'/\') if x.strip()][-1] == [x for x in to_currency.split(\'/\') if x.strip()][-1]:\n
+ return 1\n
\n
def sort_by_date(a, b):\n
if a.getStartDateRangeMin() > b.getStartDateRangeMin() :\n
@@ -178,16 +184,21 @@
<string>currency_exchange_type</string>
<string>start_date</string>
<string>kw</string>
+ <string>None</string>
+ <string>_getitem_</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>_getattr_</string>
+ <string>x</string>
<string>sort_by_date</string>
<string>context</string>
<string>object</string>
<string>Products.ERP5Type.Cache</string>
<string>CachingMethod</string>
- <string>None</string>
<string>calculateExchangeFromParameters</string>
<string>result</string>
<string>getattr</string>
- <string>_getattr_</string>
<string>mapped_value</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=13962&r1=13961&r2=13962&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision Thu Apr 5 10:43:41 2007
@@ -1,1 +1,1 @@
-47
+48
More information about the Erp5-report
mailing list