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
Eteri
erp5
Commits
38c35cd4
Commit
38c35cd4
authored
Aug 16, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Bootstrap function for Business Manager format BM also
parent
c5ff97a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+16
-0
No files found.
product/ERP5/ERP5Site.py
View file @
38c35cd4
...
@@ -2023,6 +2023,19 @@ class ERP5Generator(PortalGenerator):
...
@@ -2023,6 +2023,19 @@ class ERP5Generator(PortalGenerator):
return
p
return
p
@
classmethod
def
bootstrap_bm
(
cls
,
portal
,
bm_name
,
path_list
):
"""
Bootstrap Business Item from the paths needed
"""
bm_path
=
getBootstrapBusinessTemplateUrl
(
bm_name
)
template_tool
=
portal
.
portal_templates
manager
=
template_tool
.
newContent
(
portal_type
=
'Business Manager'
)
manager
.
importFile
(
bm_path
+
'/'
+
bm_name
+
'.zexp'
)
for
path
in
path_list
:
item
=
manager
.
getBusinessItemByPath
(
path
)
item
.
install
(
manager
)
@
classmethod
@
classmethod
def
bootstrap
(
cls
,
context
,
bt_name
,
item_name
,
content_id_list
):
def
bootstrap
(
cls
,
context
,
bt_name
,
item_name
,
content_id_list
):
bt_path
=
getBootstrapBusinessTemplateUrl
(
bt_name
)
bt_path
=
getBootstrapBusinessTemplateUrl
(
bt_name
)
...
@@ -2253,9 +2266,12 @@ class ERP5Generator(PortalGenerator):
...
@@ -2253,9 +2266,12 @@ class ERP5Generator(PortalGenerator):
"""
"""
workflow_list
=
[
'business_template_building_workflow'
,
workflow_list
=
[
'business_template_building_workflow'
,
'business_template_installation_workflow'
]
'business_template_installation_workflow'
]
manager_workflow_list
=
[
'business_manager_building_workflow'
,
'business_manager_installation_workflow'
]
tool
=
p
.
portal_workflow
tool
=
p
.
portal_workflow
tool
.
manage_delObjects
(
filter
(
tool
.
hasObject
,
workflow_list
))
tool
.
manage_delObjects
(
filter
(
tool
.
hasObject
,
workflow_list
))
self
.
bootstrap
(
tool
,
'erp5_core'
,
'WorkflowTemplateItem'
,
workflow_list
)
self
.
bootstrap
(
tool
,
'erp5_core'
,
'WorkflowTemplateItem'
,
workflow_list
)
self
.
bootstrap
(
tool
,
'erp5_business_package'
,
'WorkflowTemplateItem'
,
manager_workflow_list
)
tool
.
setChainForPortalTypes
((
'Business Template'
,),
workflow_list
)
tool
.
setChainForPortalTypes
((
'Business Template'
,),
workflow_list
)
def
setupIndex
(
self
,
p
,
**
kw
):
def
setupIndex
(
self
,
p
,
**
kw
):
...
...
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