Commit 42e07e25 authored by Jérome Perrin's avatar Jérome Perrin

Add an empty element in *_getResourceItemList script, otherwise if the value...

Add an empty element in *_getResourceItemList script, otherwise if the value is not set on the document, the listfield will display the first item, even though it's not really set on the document. This is confusing for users.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19400 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f35eee5
...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n ...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def getResourceItemList():\n def getResourceItemList():\n
result = []\n result = [(\'\', \'\')]\n
url_list = context.portal_preferences.getPreferredCampaignResourceList()\n url_list = context.portal_preferences.getPreferredCampaignResourceList()\n
for url in url_list:\n for url in url_list:\n
try:\n try:\n
......
...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n ...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def getResourceItemList():\n def getResourceItemList():\n
result = []\n result = [(\'\', \'\')]\n
url_list = context.portal_preferences.getPreferredEventResourceList()\n url_list = context.portal_preferences.getPreferredEventResourceList()\n
for url in url_list:\n for url in url_list:\n
try:\n try:\n
......
...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n ...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def getResourceItemList():\n def getResourceItemList():\n
result = []\n result = [(\'\', \'\')]\n
url_list = context.portal_preferences.getPreferredMeetingResourceList()\n url_list = context.portal_preferences.getPreferredMeetingResourceList()\n
for url in url_list:\n for url in url_list:\n
try:\n try:\n
......
...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n ...@@ -74,7 +74,7 @@ from zExceptions import Unauthorized\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def getResourceItemList():\n def getResourceItemList():\n
result = []\n result = [(\'\', \'\')]\n
url_list = context.portal_preferences.getPreferredSaleOpportunityResourceList()\n url_list = context.portal_preferences.getPreferredSaleOpportunityResourceList()\n
for url in url_list:\n for url in url_list:\n
try:\n try:\n
......
...@@ -67,14 +67,14 @@ ...@@ -67,14 +67,14 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string>"""\n
This script returns the list of items based on the preferred\n This script returns the list of items based on the preferred\n
resources for events. It is intended to be used\n resources for support requests. It is intended to be used\n
by ListField instances.\n by ListField instances.\n
"""\n """\n
from zExceptions import Unauthorized\n from zExceptions import Unauthorized\n
from Products.ERP5Type.Cache import CachingMethod\n from Products.ERP5Type.Cache import CachingMethod\n
\n \n
def getResourceItemList():\n def getResourceItemList():\n
result = []\n result = [(\'\', \'\')]\n
url_list = context.portal_preferences.getPreferredSupportRequestResourceList()\n url_list = context.portal_preferences.getPreferredSupportRequestResourceList()\n
for url in url_list:\n for url in url_list:\n
try:\n try:\n
......
167 168
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment