Commit 5f7274d5 authored by Jérome Perrin's avatar Jérome Perrin

for the same reasons as r18179, the table name also need to be prepended to

workflow state column


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18180 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 088ff059
......@@ -66,10 +66,12 @@ def getDocumentGroupByWorkflowStateList(self, **kw):
for workflow_state in possible_state_list:
selection_params = \
selection_tool.getSelectionParamsFor(selection_name).copy()
selection_params['where_expression'] = '%s is not NULL' % workflow_state
selection_params['group_by'] = ('catalog.portal_type', workflow_state)
selection_params['where_expression'] = \
'catalog.%s is not NULL' % workflow_state
selection_params['group_by'] = ('catalog.portal_type',
'catalog.%s' % workflow_state)
selection_params['select_expression'] = (
'count(catalog.uid) as count, catalog.portal_type, %s'
'count(catalog.uid) as count, catalog.portal_type, catalog.%s'
% workflow_state)
for brain in self.searchFolder(**selection_params):
......
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