Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Binh
erp5
Commits
2ccb5a9e
Commit
2ccb5a9e
authored
Nov 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass (optional) destination.
parent
015b8ce6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
...ortal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
+9
-7
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+1
-1
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
View file @
2ccb5a9e
...
...
@@ -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 = d
irectory
.manage_pasteObjects(cb_copy_data=clipboard)\n
new_object = d
irectory
[paste_result[0][\'new_id\']]\n
paste_result = d
estination
.manage_pasteObjects(cb_copy_data=clipboard)\n
new_object = d
estination
[paste_result[0][\'new_id\']]\n
message_kind = \'Clone\'\n
else:\n
new_object = d
irectory
.newContent(portal_type=portal_type)\n
new_object = d
estination
.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>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
View file @
2ccb5a9e
1086
\ No newline at end of file
1087
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment