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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
30b3da47
Commit
30b3da47
authored
Feb 08, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: setup module business application
parent
9186fdf2
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 @
30b3da47
...
@@ -34,9 +34,17 @@ module_business_application_map = {'base': ('currency_module',
...
@@ -34,9 +34,17 @@ module_business_application_map = {'base': ('currency_module',
'transformation_module'
,),
'transformation_module'
,),
}
}
base_category
=
portal
.
portal_categories
.
business_application
for
business_application_category_id
,
module_ids
in
module_business_application_map
.
items
():
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
:
for
module_id
in
module_ids
:
module
=
getattr
(
portal
,
module_id
,
None
)
module
=
getattr
(
portal
,
module_id
,
None
)
if
module
is
not
None
:
if
module
is
not
None
:
module
.
edit
(
business_application
=
business_application_category_id
)
module
.
edit
(
business_application
_value
=
business_application_category
)
return
'ok'
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