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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
erp5
Commits
cc18a344
Commit
cc18a344
authored
May 24, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExplanationCache: do not create new business link closure if unnecessary
Also do not hardcode 'business_process_module'.
parent
bdb5085a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
18 deletions
+25
-18
product/ERP5/ExplanationCache.py
product/ERP5/ExplanationCache.py
+25
-18
No files found.
product/ERP5/ExplanationCache.py
View file @
cc18a344
...
@@ -264,24 +264,31 @@ class ExplanationCache:
...
@@ -264,24 +264,31 @@ class ExplanationCache:
path_list.sort()
path_list.sort()
path_list = tuple(path_list)
path_list = tuple(path_list)
new_business_process = self.closure_cache.get(path_list)
new_business_process = self.closure_cache.get(path_list)
if new_business_process is not None:
if new_business_process is None:
self.closure_cache[business_link] = new_business_process
business_link_list = []
return new_business_process
new_business_process = business_process
for x in business_process.getBusinessLinkValueList():
# Build a new closure business process
if self.getSimulationMovementValueList(path=path_list,
module = business_process.getPortalObject().business_process_module # XXX-JPS
causality_uid=x.getUid()):
self.closure_cache[business_link] = self.closure_cache[path_list] =
\
# We have matching movements.
new_business_process = module.newContent(portal_type="Business Process",
business_link_list.append(x)
temp_object=True) # XXX-JPS is this really OK with union business processes
else:
i = 0
new_business_process = None
for business_link in business_process.getBusinessLinkValueList():
if new_business_process is None:
if self.getSimulationMovementValueList(path=path_list,
# Build a new closure business process.
causality_uid=business_link.getUid()):
# Initially, business_process is often the result of
# We have matching movements.
# asComposedDocument() and business_process.getParentValue() is not a
i += 1
# module where newContent() allows creation of Business Processes.
id = '
closure_path_
%
s
' % i
# XXX-JPS is this really OK with union business processes
new_business_process._setOb(id, business_link.asContext(id=id))
from Products.ERP5Type.Document import newTempBusinessProcess
new_business_process = newTempBusinessProcess(
self.explanation, '
closure_business_process
')
for i, x in enumerate(business_link_list):
id = '
closure_path_
%
s
' % i
new_business_process._setOb(id, x.asContext(id=id))
self.closure_cache[path_list] = new_business_process
self.closure_cache[business_link] = new_business_process
return new_business_process
return new_business_process
def getUnionBusinessProcess(self):
def getUnionBusinessProcess(self):
...
...
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