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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
da1a8081
Commit
da1a8081
authored
Feb 08, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: setup module business application
parent
f3e55a2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
bt5/romain_dev/SkinTemplateItem/portal_skins/romain_dev/ERP5Site_setupModuleList.py
...eItem/portal_skins/romain_dev/ERP5Site_setupModuleList.py
+9
-1
No files found.
bt5/romain_dev/SkinTemplateItem/portal_skins/romain_dev/ERP5Site_setupModuleList.py
View file @
da1a8081
...
...
@@ -34,9 +34,17 @@ module_business_application_map = {'base': ('currency_module',
'transformation_module'
,),
}
base_category
=
portal
.
portal_categories
.
business_application
for
business_application_category_id
,
module_ids
in
module_business_application_map
.
items
():
business_application_category
=
getattr
(
base_category
,
business_application_category_id
,
None
)
if
business_application_category
is
None
:
business_application_category
=
base_category
.
newContent
(
id
=
business_application_category_id
,
title
=
business_application_category_id
.
capitalize
(),
portal_type
=
'Category'
)
for
module_id
in
module_ids
:
module
=
getattr
(
portal
,
module_id
,
None
)
if
module
is
not
None
:
module
.
edit
(
business_application
=
business_application_category_id
)
module
.
edit
(
business_application
_value
=
business_application_category
)
return
'ok'
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