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
bac0dfa8
Commit
bac0dfa8
authored
Feb 27, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Update template_path_list while combining Business Manager
parent
2339a5ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
product/ERP5/Document/BusinessManager.py
product/ERP5/Document/BusinessManager.py
+12
-5
No files found.
product/ERP5/Document/BusinessManager.py
View file @
bac0dfa8
...
...
@@ -137,12 +137,15 @@ class BusinessManager(XMLObject):
result
=
tuple
(
result
)
return
result
def
__
r
add__
(
self
,
other
):
def
__add__
(
self
,
other
):
"""
Adds the Business Item objects for the given Business Manager objects
"""
combined_business_item_list
=
self
.
_path_item_list
.
extend
(
other
.
_path_item_list
)
self
.
_path_item_list
=
combined_business_item_list
self
.
_path_item_list
.
extend
(
other
.
_path_item_list
)
self
.
template_path_list
.
extend
(
other
.
template_path_list
)
return
self
__radd__
=
__add__
security
.
declareProtected
(
Permissions
.
ManagePortal
,
'storeTemplateData'
)
def
storeTemplateData
(
self
):
...
...
@@ -236,7 +239,9 @@ class BusinessManager(XMLObject):
A Business Manager BT is said to be reduced if and only if:
reduce(BT) = BT
"""
path_list
=
[
path_item
.
getBusinessPath
()
for
path_item
in
self
.
_path_item_list
]
path_list
=
[
path_item
.
getBusinessPath
()
for
path_item
in
self
.
_path_item_list
]
reduced_path_item_list
=
[]
# We separate the path list in the ones which are repeated and the ones
...
...
@@ -544,7 +549,7 @@ class BusinessItem(Implicit, Persistent):
else
:
return
context
def
__
r
add__
(
self
,
other
):
def
__add__
(
self
,
other
):
"""
Add the values from the path when the path is same for 2 objects
"""
...
...
@@ -556,6 +561,8 @@ class BusinessItem(Implicit, Persistent):
self
.
_value
=
self
.
_mergeValue
(
value_list
=
[
self
.
_value
,
other
.
_value
])
return
self
__radd__
=
__add__
def
_mergeValue
(
self
,
value_list
):
"""
Merge value in value 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