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
a9b300ce
Commit
a9b300ce
authored
Sep 15, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Add preinstall function to compare the status while installing Business Manager
parent
4476163e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+22
-3
No files found.
product/ERP5/Document/BusinessManager.py
View file @
a9b300ce
...
@@ -264,6 +264,28 @@ class BusinessManager(Folder):
...
@@ -264,6 +264,28 @@ class BusinessManager(Folder):
item
.
setProperty
(
'item_property_value'
,
''
)
item
.
setProperty
(
'item_property_value'
,
''
)
item
.
setProperty
(
'item_property_type'
,
''
)
item
.
setProperty
(
'item_property_type'
,
''
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'preinstall'
)
def
preinstall
(
self
,
check_dependencies
=
1
,
**
kw
):
"""
Preinstall for Business Manager comapres the installation state and returns
the changes in a manner which can keep up compatibilty with the view we use
in Business Template installation.
This function calls `portal_templates.updateInstallationState` to get the
change_list.
We don't care of check_dependencies here as this all would be taken care by
`udpateInstallationState` iteself.
"""
change_list
=
self
.
aq_parent
.
compareInstallationState
([
self
])
modified_object_list
=
{}
for
path
in
change_list
:
type_name
=
'Business Item'
if
'#'
in
path
[
0
]:
type_name
=
'Business Property Item'
modified_object_list
[
path
[
0
]]
=
[
path
[
1
],
type_name
]
return
modified_object_list
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'clean'
)
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'clean'
)
clean
=
_clean
clean
=
_clean
...
@@ -501,9 +523,6 @@ class BusinessManager(Folder):
...
@@ -501,9 +523,6 @@ class BusinessManager(Folder):
"""
"""
pass
pass
def
preinstall
(
self
,
check_dependencies
=
1
,
**
kw
):
pass
def
reduceBusinessManager
(
self
):
def
reduceBusinessManager
(
self
):
"""
"""
Reduction is a function that takes a Business Manager as input and returns
Reduction is a function that takes a Business Manager as input and returns
...
...
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