From d49edfabcc7c9ecb9fab794f799af46937928f11 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Fri, 25 Mar 2011 14:31:18 +0000 Subject: [PATCH] Fix currency conversion. newTempBase objects cannot contain categories nowadays. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44626 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_base/CurrencyExchange_getExchangeRateList.xml | 5 ++++- bt5/erp5_base/bt/revision | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml index 8678a7f3aa..5f72b2a4cd 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyExchange_getExchangeRateList.xml @@ -81,7 +81,10 @@ if to_currency is not None:\n from DateTime import DateTime\n start_date = DateTime()\n from Products.ERP5Type.Document import newTempBase\n - temp_object = newTempBase(context.getPortalObject(),\'temp_object\')\n + # Note: SupplyCell is the class of Currency Exchange Line portal type objects\n + # But in reality, anything should do.\n + from Products.ERP5Type.Document import newTempSupplyCell as newTemp\n + temp_object = newTemp(context.getPortalObject(),\'temp_object\')\n temp_kw = {\'category_list\':[\'resource/%s\' % from_currency,\n \'price_currency/%s\' % to_currency],\n \'start_date\':start_date\n diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 7179a19790..aa5bea4ec6 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -964 \ No newline at end of file +965 -- 2.30.9