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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
396cb756
Commit
396cb756
authored
Oct 03, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore manually deleted subobjects.
parent
4a474a34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+4
-1
product/ERP5/Tool/TrashTool.py
product/ERP5/Tool/TrashTool.py
+3
-4
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
396cb756
...
...
@@ -1240,7 +1240,10 @@ class ObjectTemplateItem(BaseTemplateItem):
container_path_list
=
recursive_path
.
split
(
'/'
)[:
-
1
]
self
.
_backupObject
(
action
,
trashbin
,
container_path_list
,
document_id
)
try
:
parent
.
manage_delObjects
([
document_id
])
except
BadRequest
:
pass
# subobject removed manually
else
:
# for old business template format
BaseTemplateItem
.
install
(
self
,
context
,
trashbin
,
**
kw
)
...
...
product/ERP5/Tool/TrashTool.py
View file @
396cb756
...
...
@@ -82,7 +82,7 @@ class TrashTool(BaseTool):
if
object_id
not
in
backup_object_container
.
objectIds
():
# export object
object_path
=
container_path
+
[
object_id
]
obj
=
self
.
unrestrictedTraverse
(
object_path
)
obj
=
self
.
unrestrictedTraverse
(
object_path
,
None
)
if
obj
is
not
None
:
connection
=
obj
.
_p_jar
o
=
obj
...
...
@@ -138,11 +138,10 @@ class TrashTool(BaseTool):
if
not
keep_sub
:
# export subobjects
if
save
:
obj
=
backup_object_container
.
_getOb
(
object_id
)
object_path
=
list
(
obj
.
getPhysicalPath
())
obj
=
backup_object_container
.
_getOb
(
object_id
,
None
)
else
:
object_path
=
container_path
+
[
object_id
]
obj
=
self
.
unrestrictedTraverse
(
object_path
)
obj
=
self
.
unrestrictedTraverse
(
object_path
,
None
)
if
obj
is
not
None
:
for
subobject_id
in
list
(
obj
.
objectIds
()):
subobject
=
obj
.
unrestrictedTraverse
(
subobject_id
)
...
...
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