Commit 6b9f9a62 authored by Sebastien Robin's avatar Sebastien Robin

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
parent 2b267bdc
......@@ -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
......
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