Commit 7bf05a26 authored by Jérome Perrin's avatar Jérome Perrin

To get all documents from a selection, use callSelectionFor, not getSelectionValueList.

Remove references to selection_index, it does not make sense in list mode.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20110 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 647f4474
...@@ -77,7 +77,7 @@ module = context.getDefaultModule(portal_type)\n ...@@ -77,7 +77,7 @@ module = context.getDefaultModule(portal_type)\n
# Build selection\n # Build selection\n
person_list = context.portal_selections.getSelectionCheckedValueList(selection_name)\n person_list = context.portal_selections.getSelectionCheckedValueList(selection_name)\n
if not person_list:\n if not person_list:\n
person_list = context.portal_selections.getSelectionValueList(selection_name)\n person_list = context.portal_selections.callSelectionFor(selection_name)\n
\n \n
# Find authenticated user\n # Find authenticated user\n
user = context.portal_membership.getAuthenticatedMember()\n user = context.portal_membership.getAuthenticatedMember()\n
...@@ -108,7 +108,7 @@ else:\n ...@@ -108,7 +108,7 @@ else:\n
# This case is not possible\n # This case is not possible\n
portal_status_message = translateString("The Single Event option can only be used with outgoing messages",\n portal_status_message = translateString("The Single Event option can only be used with outgoing messages",\n
mapping = dict(portal_type = portal_type, count=count))\n mapping = dict(portal_type = portal_type, count=count))\n
return context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_status_message, selection_name=selection_name, selection_index=selection_index), **kw)\n return context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_status_message, selection_name=selection_name), **kw)\n
# Proceed to event creation\n # Proceed to event creation\n
event = module.newContent(portal_type=portal_type, \n event = module.newContent(portal_type=portal_type, \n
description=description, \n description=description, \n
...@@ -120,12 +120,10 @@ else:\n ...@@ -120,12 +120,10 @@ else:\n
event.setSourceValue(user_person)\n event.setSourceValue(user_person)\n
count = 1\n count = 1\n
\n \n
# Redirect to the event module (but is this the best place to go since events are not yet indexed ?)\n
portal_status_message = translateString("Created and associated ${count} new Events to the selected Ticket.", \n portal_status_message = translateString("Created and associated ${count} new Events to the selected Ticket.", \n
mapping=dict(count=count))\n mapping=dict(count=count))\n
context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_status_message,\n context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_status_message,\n
selection_name=selection_name,\n selection_name=selection_name), **kw)\n
selection_index=selection_index), **kw)\n
]]></string> </value> ]]></string> </value>
...@@ -144,7 +142,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st ...@@ -144,7 +142,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>portal_type, title, description, direction, selection_name, selection_index, follow_up, single_event=0, text_content, form_id, **kw</string> </value> <value> <string>portal_type, title, description, direction, selection_name, follow_up, single_event=0, text_content, form_id, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -164,7 +162,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st ...@@ -164,7 +162,7 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>10</int> </value> <value> <int>9</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -175,7 +173,6 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st ...@@ -175,7 +173,6 @@ context.Base_redirect(form_id, keep_items = dict(portal_status_message=portal_st
<string>description</string> <string>description</string>
<string>direction</string> <string>direction</string>
<string>selection_name</string> <string>selection_name</string>
<string>selection_index</string>
<string>follow_up</string> <string>follow_up</string>
<string>single_event</string> <string>single_event</string>
<string>text_content</string> <string>text_content</string>
......
202 206
\ 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