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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
918ada2b
Commit
918ada2b
authored
Apr 30, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BusinessProcess: use immutable to avoid useless copies
parent
9781d567
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Document/BusinessProcess.py
product/ERP5/Document/BusinessProcess.py
+4
-4
No files found.
product/ERP5/Document/BusinessProcess.py
View file @
918ada2b
...
@@ -214,9 +214,9 @@ class BusinessProcess(Path, XMLObject):
...
@@ -214,9 +214,9 @@ class BusinessProcess(Path, XMLObject):
"""
"""
if
trade_phase
is
not
None
:
if
trade_phase
is
not
None
:
if
isinstance
(
trade_phase
,
basestring
):
if
isinstance
(
trade_phase
,
basestring
):
trade_phase
=
set
((
trade_phase
,))
trade_phase
=
frozen
set
((
trade_phase
,))
else
:
else
:
trade_phase
=
set
(
trade_phase
)
trade_phase
=
frozen
set
(
trade_phase
)
kw
.
setdefault
(
'portal_type'
,
self
.
getPortalBusinessLinkTypeList
())
kw
.
setdefault
(
'portal_type'
,
self
.
getPortalBusinessLinkTypeList
())
kw
.
setdefault
(
'sort_on'
,
'int_index'
)
kw
.
setdefault
(
'sort_on'
,
'int_index'
)
original_business_link_list
=
self
.
objectValues
(
**
kw
)
# Why Object Values ??? XXX-JPS
original_business_link_list
=
self
.
objectValues
(
**
kw
)
# Why Object Values ??? XXX-JPS
...
@@ -231,7 +231,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -231,7 +231,7 @@ class BusinessProcess(Path, XMLObject):
if
(
successor
is
not
_marker
and
if
(
successor
is
not
_marker
and
business_link
.
getSuccessor
()
!=
successor
):
business_link
.
getSuccessor
()
!=
successor
):
continue
# Filter our business link which successor does not match
continue
# Filter our business link which successor does not match
if
trade_phase
is
not
None
and
not
trade_phase
.
intersection
(
if
trade_phase
is
not
None
and
trade_phase
.
isdisjoint
(
business_link
.
getTradePhaseList
()):
business_link
.
getTradePhaseList
()):
continue
# Filter our business link which trade phase does not match
continue
# Filter our business link which trade phase does not match
business_link_list
.
append
(
business_link
)
business_link_list
.
append
(
business_link
)
...
@@ -686,7 +686,7 @@ class BusinessProcess(Path, XMLObject):
...
@@ -686,7 +686,7 @@ class BusinessProcess(Path, XMLObject):
id_index
=
0
id_index
=
0
base_id
=
amount
.
getId
()
base_id
=
amount
.
getId
()
if
update_property_dict
is
None
:
update_property_dict
=
{}
if
update_property_dict
is
None
:
update_property_dict
=
{}
filter_trade_phase
=
set
(
trade_phase
).
intersection
filter_trade_phase
=
frozen
set
(
trade_phase
).
intersection
for
trade_model_path
in
self
.
getTradeModelPathValueList
(
context
=
amount
,
trade_phase
=
trade_phase
):
for
trade_model_path
in
self
.
getTradeModelPathValueList
(
context
=
amount
,
trade_phase
=
trade_phase
):
id_index
+=
1
id_index
+=
1
movement
=
newTempSimulationMovement
(
trade_model_path
,
movement
=
newTempSimulationMovement
(
trade_model_path
,
...
...
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