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
Nikola Balog
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:
...
@@ -506,12 +506,17 @@ class CopyContainer:
# Note: do not use __recurse as it only iterates over immediate content,
# 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
# 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 .
# 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
]
todo_list
=
[
new_ob
]
while
todo_list
:
while
todo_list
:
document
=
todo_list
.
pop
()
document
=
todo_list
.
pop
()
todo_list
.
extend
(
document
.
objectValues
())
todo_list
.
extend
(
document
.
objectValues
())
todo_list
.
extend
(
document
.
opaqueValues
())
opaqueValues
=
getattr
(
document
,
'opaqueValues'
,
None
)
document
.
_setUid
(
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
)
self
.
_setObject
(
new_id
,
new_ob
,
set_owner
=
set_owner
)
new_ob
=
self
.
_getOb
(
new_id
)
new_ob
=
self
.
_getOb
(
new_id
)
new_ob
.
_postCopy
(
self
,
op
=
op
)
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