[Erp5-report] r16241 - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 11 08:04:25 CEST 2007


Author: vincent
Date: Tue Sep 11 08:04:24 2007
New Revision: 16241

URL: http://svn.erp5.org?rev=16241&view=rev
Log:
Check maximum date on all workflows instead of stopping the scan at the first found date.

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=16241&r1=16240&r2=16241&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py (original)
+++ erp5/trunk/products/ERP5Type/Base.py Tue Sep 11 08:04:24 2007
@@ -2876,13 +2876,16 @@
     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')




More information about the Erp5-report mailing list