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
7e3f0493
Commit
7e3f0493
authored
Aug 01, 2017
by
Ayush Tiwari
Committed by
Ayush Tiwari
Nov 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Add type_workflow_list property while migrating portal_types objects
parent
d4197389
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+11
-4
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
7e3f0493
...
@@ -615,6 +615,9 @@ class TemplateTool (BaseTool):
...
@@ -615,6 +615,9 @@ class TemplateTool (BaseTool):
export_dir = mkdtemp()
export_dir = mkdtemp()
removable_property = {}
removable_sub_object_path = []
installed_bt_list = self.getInstalledBusinessTemplatesList()
installed_bt_list = self.getInstalledBusinessTemplatesList()
installed_bt_title_list = [bt.title for bt in installed_bt_list]
installed_bt_title_list = [bt.title for bt in installed_bt_list]
...
@@ -646,10 +649,17 @@ class TemplateTool (BaseTool):
...
@@ -646,10 +649,17 @@ class TemplateTool (BaseTool):
# For portal_types, we have to add path and subobjects
# For portal_types, we have to add path and subobjects
portal_type_id_list
=
import_template
.
getTemplatePortalTypeIdList
()
portal_type_id_list
=
import_template
.
getTemplatePortalTypeIdList
()
portal_type_path_list
=
[]
portal_type_path_list
=
[]
portal_type_workflow_chain_path_list
=
[]
for
id
in
portal_type_id_list
:
for
id
in
portal_type_id_list
:
portal_type_path_list
.
append
(
'portal_types/'
+
id
)
portal_type_path_list
.
append
(
'portal_types/'
+
id
)
#portal_type_path_list.append('portal_types/'+id+'/**')
# Add type_worklow list separately in path
portal_type_workflow_chain_path_list
.
append
(
'portal_types/'
+
id
+
'#type_workflow_list'
)
# Remove type_workflow_list from the objects, so that we don't end up in
# conflict
portal_type_path
=
'portal_types/'
+
id
removable_property
[
portal_type_path
]
=
[
'type_workflow_list'
]
template_path_list
.
extend
(
portal_type_path_list
)
template_path_list
.
extend
(
portal_type_path_list
)
template_path_list
.
extend
(
portal_type_workflow_chain_path_list
)
# For categories, we create path for category objects as well as the subcategories
# For categories, we create path for category objects as well as the subcategories
category_list
=
import_template
.
getTemplateBaseCategoryList
()
category_list
=
import_template
.
getTemplateBaseCategoryList
()
...
@@ -780,9 +790,6 @@ class TemplateTool (BaseTool):
...
@@ -780,9 +790,6 @@ class TemplateTool (BaseTool):
'sql_catalog_topic_search_keys_list'
,
'sql_catalog_topic_search_keys_list'
,
]
]
removable_property
=
{}
removable_sub_object_path
=
[]
if
is_property_added
:
if
is_property_added
:
if
catalog_method_path_list
:
if
catalog_method_path_list
:
catalog_path
=
catalog_method_path_list
[
0
].
rsplit
(
'/'
,
1
)[
0
]
catalog_path
=
catalog_method_path_list
[
0
].
rsplit
(
'/'
,
1
)[
0
]
...
...
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