[Erp5-report] r40238 jerome - in /erp5/trunk/bt5/erp5_base: SkinTemplateItem/portal_skins/e...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 12 14:42:50 CET 2010
Author: jerome
Date: Fri Nov 12 14:42:48 2010
New Revision: 40238
URL: http://svn.erp5.org?rev=40238&view=rev
Log:
Change CurrencyModule_getCurrencyItemList to accept "validation_state" parameter
Modified:
erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml
erp5/trunk/bt5/erp5_base/bt/revision
Modified: erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml?rev=40238&r1=40237&r2=40238&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/CurrencyModule_getCurrencyItemList.xml [utf8] Fri Nov 12 14:42:48 2010
@@ -56,18 +56,17 @@ from Products.CMFCore.permissions import
\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_empt
</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_empt
<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_empt
<value>
<tuple>
<int>1</int>
- <int>1</int>
+ <tuple>
+ <string>validated</string>
+ <string>draft</string>
+ </tuple>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_base/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_base/bt/revision?rev=40238&r1=40237&r2=40238&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_base/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_base/bt/revision [utf8] Fri Nov 12 14:42:48 2010
@@ -1 +1 @@
-895
\ No newline at end of file
+896
\ No newline at end of file
More information about the Erp5-report
mailing list