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
preetwinder
erp5
Commits
3c7fe462
Commit
3c7fe462
authored
Jan 17, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not reinvent the wheel.
parent
370eafc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
product/ERP5/Document/SimulationMovement.py
product/ERP5/Document/SimulationMovement.py
+7
-8
No files found.
product/ERP5/Document/SimulationMovement.py
View file @
3c7fe462
...
...
@@ -645,7 +645,6 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
composed_document
=
self
.
asComposedDocument
()
predecessor_link_list
=
composed_document
.
getBusinessLinkValueList
(
successor
=
predecessor_state
)
business_link_list
=
composed_document
.
getBusinessLinkValueList
()
def
isBuiltAndCompleted
(
simulation
,
path
):
return
simulation
.
getSimulationState
()
in
path
.
getCompletedStateList
()
...
...
@@ -661,15 +660,15 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
business_link
=
current
.
getCausality
(
portal_type
=
'Business Link'
)
if
business_link
is
None
:
# no direct business link set on movement, use predicate to find one
for
candidate_business_link
in
business_link_list
:
if
candidate_business_link
.
test
(
current
):
if
business_link
is
not
None
:
raise
ValueError
(
'Business Link predicate matches too many '
'movements.'
)
business_link
=
candidate_business_link
.
getRelativeUrl
()
if
not
business_link
:
business_link_list
=
composed_document
.
getBusinessLinkValueList
(
context
=
current
)
if
len
(
business_link
)
==
0
:
raise
ValueError
(
'Business Link predicate matches too many '
'movements.'
)
if
len
(
business_link
)
>
1
:
raise
ValueError
(
'Simulation Movement has no Business Link related '
'and no Business Link from current Business Process matches'
)
business_link
=
business_link_list
[
0
].
getRelativeUrl
()
causality_dict
[
business_link
]
=
current
current
=
current
.
getParentValue
().
getParentValue
()
...
...
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