Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
0b2a4d53
Commit
0b2a4d53
authored
Aug 07, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Remove the old_path from template_path_list before adding edited path
parent
9773d8e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+8
-0
No files found.
product/ERP5/Document/BusinessManager.py
View file @
0b2a4d53
...
...
@@ -672,6 +672,7 @@ class BusinessItem(XMLObject):
"""
Overriden function so that we can update attributes for BusinessItem objects
"""
old_path
=
self
.
constructTemplatePath
()
edited
=
super
(
BusinessItem
,
self
).
_edit
(
item_path
=
item_path
,
item_sign
=
item_sign
,
item_layer
=
item_layer
,
...
...
@@ -684,6 +685,9 @@ class BusinessItem(XMLObject):
if
not
template_path_list
:
template_path_list
=
[]
new_template_path_list
=
list
(
template_path_list
)
# Remove the old path and append it with new path in template_path_list
# for the parent Business Manager
new_template_path_list
.
remove
(
old_path
)
new_template_path_list
.
append
(
new_path
)
manager
.
setProperty
(
'template_path_list'
,
new_template_path_list
)
return
edited
...
...
@@ -1021,6 +1025,7 @@ class BusinessPropertyItem(XMLObject):
"""
Overriden function so that we can update attributes for BusinessItem objects
"""
old_path
=
self
.
constructTemplatePath
()
edited
=
super
(
BusinessPropertyItem
,
self
).
_edit
(
item_path
=
item_path
,
item_sign
=
item_sign
,
item_layer
=
item_layer
,
...
...
@@ -1033,6 +1038,9 @@ class BusinessPropertyItem(XMLObject):
if
not
template_path_list
:
template_path_list
=
[]
new_template_path_list
=
list
(
template_path_list
)
# Remove the old path and append it with new path in template_path_list
# for the parent Business Manager
new_template_path_list
.
remove
(
old_path
)
new_template_path_list
.
append
(
new_path
)
manager
.
setProperty
(
'template_path_list'
,
new_template_path_list
)
return
edited
...
...
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