diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml index e740101fbb766fdbee43da59da967161593ebf7a..6aa87820203e52bf6d57aa5942d212fab8e8f2f0 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml @@ -85,10 +85,13 @@ else:\n parent = context.getParentValue()\n allowed_type_list = parent.getVisibleAllowedContentTypeList()\n if portal_type not in allowed_type_list:\n - return context.ERP5Site_redirect(\'%s/%s/view\' % (\n - parent.getUrl(), context.getId()),\n - keep_items={\'portal_status_message\':\n - translateString("You are not allowed to clone this object.")})\n + if batch_mode:\n + return None\n + else:\n + return context.ERP5Site_redirect(\'%s/%s/view\' % (\n + parent.getUrl(), context.getId()),\n + keep_items={\'portal_status_message\':\n + translateString("You are not allowed to clone this object.")})\n \n # prepare query params\n kw = {\'portal_type\' : translateString(portal_type)}\n @@ -105,12 +108,15 @@ if clone:\n new_object = directory[paste_result[0][\'new_id\']]\n message_kind = \'Clone\'\n \n -if not editable_mode: \n - form_id = \'view\'\n -msg = translateString("Created %s ${portal_type}." % message_kind, mapping = kw)\n -return new_object.Base_redirect(form_id, \n - editable_mode=1,\n - keep_items={\'portal_status_message\': msg})\n +if batch_mode:\n + return new_object\n +else:\n + if not editable_mode: \n + form_id = \'view\'\n + msg = translateString("Created %s ${portal_type}." % message_kind, mapping = kw)\n + return new_object.Base_redirect(form_id, \n + editable_mode=1,\n + keep_items={\'portal_status_message\': msg})\n </string> </value> </item> <item> @@ -127,7 +133,7 @@ return new_object.Base_redirect(form_id, \n </item> <item> <key> <string>_params</string> </key> - <value> <string>clone=1, form_id, editable_mode=0</string> </value> + <value> <string>clone=1, form_id, editable_mode=0, batch_mode=0</string> </value> </item> <item> <key> <string>_proxy_roles</string> </key> @@ -153,7 +159,7 @@ return new_object.Base_redirect(form_id, \n <dictionary> <item> <key> <string>co_argcount</string> </key> - <value> <int>3</int> </value> + <value> <int>4</int> </value> </item> <item> <key> <string>co_varnames</string> </key> @@ -162,6 +168,7 @@ return new_object.Base_redirect(form_id, \n <string>clone</string> <string>form_id</string> <string>editable_mode</string> + <string>batch_mode</string> <string>_getattr_</string> <string>context</string> <string>translateString</string> @@ -170,9 +177,9 @@ return new_object.Base_redirect(form_id, \n <string>_getitem_</string> <string>parent</string> <string>allowed_type_list</string> + <string>None</string> <string>kw</string> <string>getattr</string> - <string>None</string> <string>directory</string> <string>original_id</string> <string>clipboard</string> @@ -195,6 +202,7 @@ return new_object.Base_redirect(form_id, \n <int>1</int> <none/> <int>0</int> + <int>0</int> </tuple> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 99f9f071dc26630c3d51364ba0f006051ee47b71..03164581e1907e19a03913435afdd0feb04f9c08 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -502 \ No newline at end of file +503 \ No newline at end of file