Commit 6e09f180 authored by Vincent Pelletier's avatar Vincent Pelletier

Check maximum date on all workflows instead of stopping the scan at the first found date.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16241 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c7a9b04c
......@@ -2876,13 +2876,16 @@ class Base( CopyContainer,
wf = portal_workflow.getWorkflowById('edit_workflow')
wf_list = list(portal_workflow.getWorkflowsFor(self))
if wf is not None: wf_list = [wf] + wf_list
max_date = None
for wf in wf_list:
history = wf.getInfoFor(self, 'history', None)
if history is not None:
if len(history):
date = history[-1].get('time', None)
# Then get the last line of edit_workflow
return history[-1].get('time', None)
return None
if date > max_date:
max_date = date
return max_date
# Layout management
security.declareProtected(Permissions.AccessContentsInformation, 'getApplicableLayout')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment