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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
97d6b818
Commit
97d6b818
authored
Jan 09, 2020
by
Yusei Tahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EPR5Type.CopySupport: Support non-ERP5ish objects.
parent
accf13dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
product/ERP5Type/CopySupport.py
product/ERP5Type/CopySupport.py
+7
-2
No files found.
product/ERP5Type/CopySupport.py
View file @
97d6b818
...
...
@@ -506,12 +506,17 @@ class CopyContainer:
# Note: do not use __recurse as it only iterates over immediate content,
# and then stop instead of calling itself into them. It relies on called
# methods to call it back, and we do not want that for _setUid .
# Basically this block of code is for ERP5ish objects only.
todo_list
=
[
new_ob
]
while
todo_list
:
document
=
todo_list
.
pop
()
todo_list
.
extend
(
document
.
objectValues
())
todo_list
.
extend
(
document
.
opaqueValues
())
document
.
_setUid
(
None
)
opaqueValues
=
getattr
(
document
,
'opaqueValues'
,
None
)
if
opaqueValues
is
not
None
:
todo_list
.
extend
(
opaqueValues
())
_setUid
=
getattr
(
document
,
'_setUid'
,
None
)
if
_setUid
is
not
None
:
_setUid
(
None
)
self
.
_setObject
(
new_id
,
new_ob
,
set_owner
=
set_owner
)
new_ob
=
self
.
_getOb
(
new_id
)
new_ob
.
_postCopy
(
self
,
op
=
op
)
...
...
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