Commit 88a10a5f authored by Vincent Pelletier's avatar Vincent Pelletier

Grab portal once and use it as acquitision context.

Refresh worklist SQL cache as it's now safe to call this method even if required scripts are not available (it's a noop then).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18528 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 20ed0d00
......@@ -1139,11 +1139,13 @@ class TestERP5BankingMixin:
def checkWorklist(self, document):
"""
"""
document.portal_caches.clearAllCache()
portal = self.getPortalObject()
portal.portal_caches.clearAllCache()
portal.portal_workflow.refreshWorklistCache()
portal_type = document.getPortalType()
state = document.getSimulationState()
workflow_id = '%s_workflow' % portal_type.lower().replace(' ', '_')
actions = self.getPortal().portal_actions.listFilteredActionsFor(document)
actions = portal.portal_actions.listFilteredActionsFor(document)
found = 0
for action in actions['global']:
if action.get('workflow_id', None) == workflow_id:
......
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