From 6b9f9a6281fa2e763f8955135dab202c4a5381e2 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Fri, 1 Oct 2004 10:19:22 +0000 Subject: [PATCH] added support of worklist using a condition on a date git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1809 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/ZopePatch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/product/ERP5Type/ZopePatch.py b/product/ERP5Type/ZopePatch.py index 9377b6c8d3..21056f8df2 100755 --- a/product/ERP5Type/ZopePatch.py +++ b/product/ERP5Type/ZopePatch.py @@ -26,6 +26,7 @@ from zLOG import LOG from string import join +from DateTime import DateTime ############################################################################## # Folder naming: member folder should be names as a singular in small caps @@ -320,6 +321,10 @@ class PatchedDCWorkflowDefinition(DCWorkflowDefinition): portal = self._getPortalRoot() res = [] fmt_data = None + # We want to display some actions depending on the current date + # So, we can now put this kind of expression : <= "%(now)s" + # May be this patch should be moved to listFilteredActions in the future + info.now = DateTime() for id, qdef in self.worklists.items(): if qdef.actbox_name: guard = qdef.guard @@ -340,7 +345,7 @@ class PatchedDCWorkflowDefinition(DCWorkflowDefinition): if not (guard is None or guard.check(sm, self, portal)): dict['local_roles'] = guard.roles # Patch to use ZSQLCatalog and get high speed - # LOG("PatchedDCWorkflowDefinition", 0, str(dict)) + # LOG("PatchedDCWorkflowDefinition", 0, dict) searchres_len = int(apply(catalog.countResults, (), dict)[0][0]) if searchres_len == 0: continue -- 2.30.9