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 d0ebf3a48c2720730e7e26ca4cf82f70d3cbc848..eb45fdf0058fcfe91a98ab7ddda22ff9e765342d 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 @@ -65,8 +65,10 @@ else:\n portal_type = form_data[\'clone_portal_type\']\n \n # We copy contents in place if possible\n -directory = getattr(context, \'original_container\', None) or context.getParentValue()\n -allowed_type_list = directory.getVisibleAllowedContentTypeList()\n +source = getattr(context, \'original_container\', None) or context.getParentValue()\n +if destination is None:\n + destination = source\n +allowed_type_list = destination.getVisibleAllowedContentTypeList()\n if portal_type not in allowed_type_list:\n if batch_mode:\n return None\n @@ -91,14 +93,14 @@ if clone:\n # Copy and paste the object\n original_id = getattr(context, \'original_id\', None) or context.getId()\n # This is required for objects acquired in Web Section\n - clipboard = directory.manage_copyObjects(ids=[original_id])\n + clipboard = source.manage_copyObjects(ids=[original_id])\n context.REQUEST.set(\'__cp\', clipboard) # CopySupport is using this to set\n # tracebility information in edit_workflow history\n - paste_result = directory.manage_pasteObjects(cb_copy_data=clipboard)\n - new_object = directory[paste_result[0][\'new_id\']]\n + paste_result = destination.manage_pasteObjects(cb_copy_data=clipboard)\n + new_object = destination[paste_result[0][\'new_id\']]\n message_kind = \'Clone\'\n else:\n - new_object = directory.newContent(portal_type=portal_type)\n + new_object = destination.newContent(portal_type=portal_type)\n message_kind = \'New\'\n \n if web_mode:\n @@ -129,7 +131,7 @@ else:\n </item> <item> <key> <string>_params</string> </key> - <value> <string>clone=1, form_id=\'view\', web_mode=0, editable_mode=0, batch_mode=0</string> </value> + <value> <string>clone=1, form_id=\'view\', web_mode=0, editable_mode=0, batch_mode=0, destination=None</string> </value> </item> <item> <key> <string>id</string> </key> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 7589ee2fc1c1558e1d3b243d19342b8da721a399..3430292e09f47fc7fd8752393a638faf20b1f7eb 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -1086 \ No newline at end of file +1087 \ No newline at end of file