Commit 52a84e89 authored by Jérome Perrin's avatar Jérome Perrin

simplify a bit TemplateTool_installBusinessTemplateListAction and redirect to /view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23124 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b143fa77
...@@ -74,11 +74,7 @@ bt_dict = {}\n ...@@ -74,11 +74,7 @@ bt_dict = {}\n
object_to_update = {}\n object_to_update = {}\n
for item in listbox:\n for item in listbox:\n
bt_id, object_id = item[\'listbox_key\'].split(\'|\')\n bt_id, object_id = item[\'listbox_key\'].split(\'|\')\n
if bt_dict.has_key(bt_id):\n bt_dict.setdefault(bt_id, dict())[object_id] = item[\'choice\'][0]\n
bt_dict[bt_id][object_id] = item[\'choice\'][0]\n
else:\n
bt_dict[bt_id] = {}\n
bt_dict[bt_id][object_id] = item[\'choice\'][0]\n
\n \n
bt_title_list = []\n bt_title_list = []\n
for bt_id in bt_id_list:\n for bt_id in bt_id_list:\n
...@@ -94,7 +90,7 @@ for bt_id in bt_id_list:\n ...@@ -94,7 +90,7 @@ for bt_id in bt_id_list:\n
REQUEST = container.REQUEST\n REQUEST = container.REQUEST\n
RESPONSE = REQUEST.RESPONSE\n RESPONSE = REQUEST.RESPONSE\n
\n \n
return RESPONSE.redirect("%s?portal_status_message=Business+Template+%s+installed" % \\\n return RESPONSE.redirect("%s/view?portal_status_message=Business+Template+%s+installed" % \\\n
(context.absolute_url(), \',+\'.join(bt_title_list)))\n (context.absolute_url(), \',+\'.join(bt_title_list)))\n
</string> </value> </string> </value>
</item> </item>
...@@ -160,6 +156,7 @@ return RESPONSE.redirect("%s?portal_status_message=Business+Template+%s+installe ...@@ -160,6 +156,7 @@ return RESPONSE.redirect("%s?portal_status_message=Business+Template+%s+installe
<string>bt_id</string> <string>bt_id</string>
<string>object_id</string> <string>object_id</string>
<string>_write_</string> <string>_write_</string>
<string>dict</string>
<string>bt_title_list</string> <string>bt_title_list</string>
<string>object_list</string> <string>object_list</string>
<string>bt</string> <string>bt</string>
......
937 938
\ 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