From 0a8e682e677d08d4652ed58aa883999d8098b19c Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Thu, 3 Jul 2008 13:25:50 +0000 Subject: [PATCH] Do not compute precision: displayed exchange rate is related to selected currency, so there is no point in doning any rounding to the value to display. Also, unify the way exchange rate is computed. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22253 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../your_exchange_rate.xml | 24 +++---------------- .../your_exchange_rate.xml | 22 ++--------------- bt5/erp5_banking_cash/bt/revision | 2 +- 3 files changed, 6 insertions(+), 42 deletions(-) diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencyPurchase_view/your_exchange_rate.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencyPurchase_view/your_exchange_rate.xml index a7ce91021c..f562dff453 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencyPurchase_view/your_exchange_rate.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencyPurchase_view/your_exchange_rate.xml @@ -157,9 +157,7 @@ </item> <item> <key> <string>precision</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>required</string> </key> @@ -230,7 +228,7 @@ </item> <item> <key> <string>precision</string> </key> - <value> <int>0</int> </value> + <value> <string></string> </value> </item> <item> <key> <string>required</string> </key> @@ -261,23 +259,7 @@ <dictionary> <item> <key> <string>_text</string> </key> - <value> <string>python: here.CurrencyExchange_getExchangeRateList()[0]</string> </value> - </item> - </dictionary> - </pickle> - </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <tuple> - <global name="TALESMethod" module="Products.Formulator.TALESField"/> - <tuple/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_text</string> </key> - <value> <string>python: here.getResourceValue().getQuantityPrecision()</string> </value> + <value> <string>python: here.CurrencyExchange_getExchangeRateList(from_currency=here.getResource(), to_currency=\'currency_module/%s\' % (here.Baobab_getPortalReferenceCurrencyID()), currency_exchange_type=\'purchase\', start_date=here.getStartDate())[0]</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencySale_view/your_exchange_rate.xml b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencySale_view/your_exchange_rate.xml index 84033846ef..e6c7b0226e 100644 --- a/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencySale_view/your_exchange_rate.xml +++ b/bt5/erp5_banking_cash/SkinTemplateItem/portal_skins/erp5_banking_cash/CashToCurrencySale_view/your_exchange_rate.xml @@ -157,9 +157,7 @@ </item> <item> <key> <string>precision</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>required</string> </key> @@ -230,7 +228,7 @@ </item> <item> <key> <string>precision</string> </key> - <value> <int>0</int> </value> + <value> <string></string> </value> </item> <item> <key> <string>required</string> </key> @@ -266,20 +264,4 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <tuple> - <global name="TALESMethod" module="Products.Formulator.TALESField"/> - <tuple/> - </tuple> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_text</string> </key> - <value> <string>python: here.getResourceValue().getQuantityPrecision()</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_banking_cash/bt/revision b/bt5/erp5_banking_cash/bt/revision index 823aeb4b44..e0c903f474 100644 --- a/bt5/erp5_banking_cash/bt/revision +++ b/bt5/erp5_banking_cash/bt/revision @@ -1 +1 @@ -624 \ No newline at end of file +625 \ No newline at end of file -- 2.30.9