Commit daa4b7c3 authored by Lucas Carvalho's avatar Lucas Carvalho

improved WebSite_setupECommerceWebSite, it must remove web section before...

improved WebSite_setupECommerceWebSite, it must remove web section before creation to avoid BadRequest error.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28322 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3cb04d78
......@@ -61,6 +61,11 @@ if (context.getPortalType() != \'Web Site\'):\n
})\n
\n
# creation the default sections\n
object_id_list = [\'cart\', \'checkout\', \'account\', \'register\']\n
for id in object_id_list:\n
if id in context.objectIds():\n
context.manage_delObjects([id])\n
\n
cart_section = context.newContent(portal_type=\'Web Section\', title=\'Cart\', id=\'cart\')\n
checkout_section = context.newContent(portal_type=\'Web Section\', title=\'Checkout\', id=\'checkout\')\n
account_section = context.newContent(portal_type=\'Web Section\', title=\'My account\', id=\'account\')\n
......@@ -135,6 +140,9 @@ context.Base_redirect(\'\', keep_items={\n
<string>context</string>
<string>translateString</string>
<string>dict</string>
<string>object_id_list</string>
<string>_getiter_</string>
<string>id</string>
<string>cart_section</string>
<string>checkout_section</string>
<string>account_section</string>
......
147
\ No newline at end of file
148
\ 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