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
Kasra Jamshidi
erp5
Commits
0cd284ed
Commit
0cd284ed
authored
Apr 27, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Always set the object after removing te acquisition
parent
1701dcef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+1
-1
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+4
-7
No files found.
product/ERP5/Document/BusinessManager.py
View file @
0cd284ed
...
@@ -278,7 +278,7 @@ class BusinessManager(Folder):
...
@@ -278,7 +278,7 @@ class BusinessManager(Folder):
imported_manager
=
connection
.
importFile
(
file
)
imported_manager
=
connection
.
importFile
(
file
)
self
.
title
=
imported_manager
.
title
self
.
title
=
imported_manager
.
title
for
obj
in
imported_manager
.
objectValues
():
for
obj
in
imported_manager
.
objectValues
():
self
.
_setObject
(
obj
.
getId
(),
obj
)
self
.
_setObject
(
obj
.
getId
(),
aq_base
(
obj
)
)
self
.
setProperty
(
'template_path_list'
,
imported_manager
.
getProperty
(
'template_path_list'
))
self
.
setProperty
(
'template_path_list'
,
imported_manager
.
getProperty
(
'template_path_list'
))
def
__add__
(
self
,
other
):
def
__add__
(
self
,
other
):
...
...
product/ERP5/Tool/TemplateTool.py
View file @
0cd284ed
...
@@ -1700,7 +1700,7 @@ class TemplateTool (BaseTool):
...
@@ -1700,7 +1700,7 @@ class TemplateTool (BaseTool):
title
=
'Old Installation State'
,
title
=
'Old Installation State'
,
)
)
for
item
in
combined_installed_path_item
:
for
item
in
combined_installed_path_item
:
old_installation_state
.
_setObject
(
item
.
getId
(),
item
)
old_installation_state
.
_setObject
(
item
.
getId
(),
aq_base
(
item
)
)
forbidden_bm_title_list
=
[
'Old Installation State'
,]
forbidden_bm_title_list
=
[
'Old Installation State'
,]
for
bm
in
bm_list
:
for
bm
in
bm_list
:
...
@@ -1720,8 +1720,9 @@ class TemplateTool (BaseTool):
...
@@ -1720,8 +1720,9 @@ class TemplateTool (BaseTool):
portal_type
=
'Business Manager'
,
portal_type
=
'Business Manager'
,
title
=
'New Installation State'
,
title
=
'New Installation State'
,
)
)
for
item
in
combined_new_path_item
:
for
item
in
combined_new_path_item
:
new_installation_state
.
_setObject
(
item
.
getId
(),
item
)
new_installation_state
.
_setObject
(
item
.
getId
(),
aq_base
(
item
)
)
# Create installation process, which have the changes to be made in the
# Create installation process, which have the changes to be made in the
# OFS during installation. Importantly, it should also be a Business Manager
# OFS during installation. Importantly, it should also be a Business Manager
...
@@ -1771,7 +1772,7 @@ class TemplateTool (BaseTool):
...
@@ -1771,7 +1772,7 @@ class TemplateTool (BaseTool):
to_install_path_item_list
.
append
(
item
)
to_install_path_item_list
.
append
(
item
)
for
item
in
to_install_path_item_list
:
for
item
in
to_install_path_item_list
:
installation_process
.
_setObject
(
item
.
getId
(),
item
)
installation_process
.
_setObject
(
item
.
getId
(),
aq_base
(
item
)
)
error_list
=
self
.
compareOldStateToOFS
(
installation_process
,
old_installation_state
)
error_list
=
self
.
compareOldStateToOFS
(
installation_process
,
old_installation_state
)
...
@@ -1922,10 +1923,6 @@ class TemplateTool (BaseTool):
...
@@ -1922,10 +1923,6 @@ class TemplateTool (BaseTool):
value
=
new_item
.
objectValues
()[
0
]
value
=
new_item
.
objectValues
()[
0
]
except
IndexError
:
except
IndexError
:
continue
continue
if
getattr
(
value
,
'_tree'
,
None
):
# This check is required cause only after first access we get the
# values from the dict
delattr
(
value
,
'_tree'
)
new_item
.
install
(
installation_process
)
new_item
.
install
(
installation_process
)
return
error_list
return
error_list
...
...
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