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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
0e4cda5e
Commit
0e4cda5e
authored
Oct 03, 2012
by
Łukasz Nowak
Committed by
Alain Takoudjou
Feb 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore manually deleted subobjects.
Conflicts: product/ERP5/Document/BusinessTemplate.py
parent
862a9905
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 @
0e4cda5e
...
@@ -1323,7 +1323,10 @@ class ObjectTemplateItem(BaseTemplateItem):
...
@@ -1323,7 +1323,10 @@ class ObjectTemplateItem(BaseTemplateItem):
document_id
=
document
.
getId
()
document_id
=
document
.
getId
()
self
.
_backupObject
(
action
,
trashbin
,
path
.
split
(
'/'
)[:
-
1
],
self
.
_backupObject
(
action
,
trashbin
,
path
.
split
(
'/'
)[:
-
1
],
document_id
)
document_id
)
try
:
parent
.
manage_delObjects
([
document_id
])
parent
.
manage_delObjects
([
document_id
])
except
BadRequest
:
pass
# removed manually
self
.
afterInstall
()
self
.
afterInstall
()
...
...
product/ERP5/Tool/TrashTool.py
View file @
0e4cda5e
...
@@ -84,7 +84,7 @@ class TrashTool(BaseTool):
...
@@ -84,7 +84,7 @@ class TrashTool(BaseTool):
if
object_id
not
in
backup_object_container
.
objectIds
():
if
object_id
not
in
backup_object_container
.
objectIds
():
# export object
# export object
object_path
=
container_path
+
[
object_id
]
object_path
=
container_path
+
[
object_id
]
obj
=
self
.
unrestrictedTraverse
(
object_path
)
obj
=
self
.
unrestrictedTraverse
(
object_path
,
None
)
if
obj
is
not
None
:
if
obj
is
not
None
:
connection
=
obj
.
_p_jar
connection
=
obj
.
_p_jar
o
=
obj
o
=
obj
...
@@ -140,11 +140,10 @@ class TrashTool(BaseTool):
...
@@ -140,11 +140,10 @@ class TrashTool(BaseTool):
if
not
keep_sub
:
if
not
keep_sub
:
# export subobjects
# export subobjects
if
save
:
if
save
:
obj
=
backup_object_container
.
_getOb
(
object_id
)
obj
=
backup_object_container
.
_getOb
(
object_id
,
None
)
object_path
=
list
(
obj
.
getPhysicalPath
())
else
:
else
:
object_path
=
container_path
+
[
object_id
]
object_path
=
container_path
+
[
object_id
]
obj
=
self
.
unrestrictedTraverse
(
object_path
)
obj
=
self
.
unrestrictedTraverse
(
object_path
,
None
)
if
obj
is
not
None
:
if
obj
is
not
None
:
for
subobject_id
in
list
(
obj
.
objectIds
()):
for
subobject_id
in
list
(
obj
.
objectIds
()):
subobject
=
obj
[
subobject_id
]
subobject
=
obj
[
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