Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
4f6d9e37
Commit
4f6d9e37
authored
Aug 30, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Add clean method for Business Manager
parent
7dfb9764
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+23
-0
No files found.
product/ERP5/Document/BusinessManager.py
View file @
4f6d9e37
...
...
@@ -233,6 +233,29 @@ class BusinessManager(Folder):
portal
=
self
.
getPortalObject
()
pass
def
_clean
(
self
):
"""
Clean built information.
Remove all the built sub-objects from Business Item or Business Property
Item.
"""
for
item
in
self
.
objectValues
():
if
item
.
getPortalType
()
==
'Business Item'
:
# Delete the sub-object
id_list
=
[
l
for
l
in
item
.
objectIds
()]
if
id_list
:
item
.
manage_delObjects
(
ids
=
id_list
)
elif
item
.
getPortalType
()
==
'Business Property Item'
:
# Add empty property item_property_name, value and type
# XXX: Shouldn't we check if the properties exist and then just delete
# them ?
item
.
setProperty
(
'item_property_name'
,
''
)
item
.
setProperty
(
'item_property_value'
,
''
)
item
.
setProperty
(
'item_property_type'
,
''
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'clean'
)
clean
=
_clean
def
_setTitle
(
self
,
value
):
"""
Override required due to bootstrap
...
...
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