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
b025eaa5
Commit
b025eaa5
authored
Sep 14, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Update bootstrap_bm to use dynamic class while bootstraping BM
parent
e18dcbf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+14
-3
No files found.
product/ERP5/ERP5Site.py
View file @
b025eaa5
...
...
@@ -1961,11 +1961,22 @@ class ERP5Generator(PortalGenerator):
try
:
# If template_tool doesn't exist, do nothing
template_tool
=
portal
.
portal_templates
manager
=
template_tool
.
newContent
(
portal_type
=
'Business Manager'
)
manager
.
importFile
(
bm_path
+
'/'
+
bm_name
+
'.zexp'
)
pt
=
portal
.
portal_types
# Create dynamic_class for Business Manager if it doesn't exist in
# portal_types
if
pt
.
getTypeInfo
(
'Business Manager'
)
is
None
:
import
erp5
BusinessManager
=
getattr
(
erp5
.
portal_type
,
'Business Manager'
)
BusinessManager
.
loadClass
()
manager
=
BusinessManager
(
id
=
'bootstrap_bm'
)
connection
=
pt
.
_p_jar
else
:
manager
=
template_tool
.
newContent
(
portal_type
=
'Business Manager'
)
connection
=
None
manager
.
importFile
(
bm_path
+
'/'
+
bm_name
+
'.zexp'
,
connection
)
for
path
in
path_list
:
item
=
manager
.
getBusinessItemByPath
(
path
)
item
.
install
(
manager
)
item
.
install
(
manager
,
portal
)
except
AttributeError
:
pass
...
...
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