diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml index 39e380afbda63a0acd2134f66f2e2a2a52bd4e00..7653f41afd674fae4794344a57afdf4d3f628838 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml @@ -56,18 +56,17 @@ from Products.CMFCore.permissions import AccessContentsInformation\n \n portal = context.getPortalObject()\n \n -def getCurrencyItemList(include_empty=1, portal_path=""):\n +def getCurrencyItemList(include_empty=1, validation_state=validation_state):\n result = []\n if include_empty :\n result = [[\'\', \'\'],]\n currency_module = portal.restrictedTraverse(\n - \'currency_module\', \n + \'currency_module\',\n portal.restrictedTraverse(\'currency\', None))\n \n if currency_module is not None:\n for currency in LazyFilter(currency_module.contentValues(), skip=AccessContentsInformation):\n - if not skip_invalidated or \\\n - currency.getProperty(\'validation_state\', \'default\') != \'invalidated\':\n + if currency.getProperty(\'validation_state\', \'validated\') in validation_state:\n # for currency, we intentionaly use reference (EUR) not title (Euros).\n result.append((currency.getReference() or currency.getTitleOrId(),\n currency.getRelativeUrl()))\n @@ -80,9 +79,9 @@ getCurrencyItemList = CachingMethod(\n getCurrencyItemList,\n id=\'CurrencyModule_getCurrencyItemList\',\n cache_factory = \'erp5_ui_short\')\n - \n -return getCurrencyItemList( include_empty=include_empty,\n - portal_path=portal.getPath() )\n + \n +return getCurrencyItemList(include_empty=include_empty,\n + validation_state=validation_state)\n </string> </value> </item> <item> @@ -93,7 +92,7 @@ return getCurrencyItemList( include_empty=include_empty,\n </item> <item> <key> <string>_params</string> </key> - <value> <string>include_empty=1, skip_invalidated=1</string> </value> + <value> <string>include_empty=1, validation_state=(\'validated\', \'draft\')</string> </value> </item> <item> <key> <string>errors</string> </key> @@ -120,7 +119,7 @@ return getCurrencyItemList( include_empty=include_empty,\n <value> <tuple> <string>include_empty</string> - <string>skip_invalidated</string> + <string>validation_state</string> <string>ZTUtils</string> <string>LazyFilter</string> <string>Products.CMFCore.permissions</string> @@ -144,7 +143,10 @@ return getCurrencyItemList( include_empty=include_empty,\n <value> <tuple> <int>1</int> - <int>1</int> + <tuple> + <string>validated</string> + <string>draft</string> + </tuple> </tuple> </value> </item> diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index 3f7ea5fb78a474d8fed8cdbda7ba8005404715de..721527c693e07d0876ac15c17287691ff4f398a2 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -895 \ No newline at end of file +896 \ No newline at end of file