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
Laurent S
erp5
Commits
415ea9f2
Commit
415ea9f2
authored
Sep 19, 2014
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass (optional) destination.
parent
6500fb9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
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
+10
-8
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
View file @
415ea9f2
...
...
@@ -67,10 +67,12 @@ else:\n
\n
# We copy contents in place if possible\n
try:\n
directory
= context.aq_explicit.original_container\n
source
= context.aq_explicit.original_container\n
except AttributeError:\n
directory = context.getParentValue()\n
if not (portal_type in directory.getVisibleAllowedContentTypeList() and\n
source = context.getParentValue()\n
if destination is None:\n
destination = source\n
if not (portal_type in destination.getVisibleAllowedContentTypeList() and\n
portal.portal_membership.checkPermission(\'Copy or Move\', context)):\n
if batch_mode:\n
return None\n
...
...
@@ -98,14 +100,14 @@ if clone:\n
except AttributeError:\n
original_id = 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
...
...
@@ -136,7 +138,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, **kw
</string>
</value>
<value>
<string>
clone=1, form_id=\'view\', web_mode=0, editable_mode=0, batch_mode=0,
destination=None,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
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