Commit 681b9f5e authored by Fabien Morin's avatar Fabien Morin

update ERP5Site_getSecurityFromLatestWorkflowHistory to remove workflow hardcoded value

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24253 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c81fb86a
......@@ -79,17 +79,25 @@ The parameters are\n
\n
NOTE: for now, this script requires proxy manager\n
"""\n
from Products.CMFCore.WorkflowCore import WorkflowException\n
\n
portal_workflow = context.getPortalObject().portal_workflow\n
\n
history_list = context.portal_workflow.getInfoFor(ob=context, \n
name=\'history\', wf_id=\'egov_universal_workflow\')\n
# reverse the list to get the first assign user\n
history_list = list(history_list)\n
history_list.reverse()\n
\n
last_site, last_group, last_function, last_user = (None, None, None, None)\n
for history_line in history_list:\n
\n
wf_list = [x for x, y in context.getWorkflowStateItemList()]\n
for wf_id in wf_list: \n
try:\n
history_list = context.portal_workflow.getInfoFor(ob=context, \n
name=\'history\', wf_id=wf_id)\n
except WorkflowException:\n
continue\n
\n
# reverse the list to get the first assign user\n
history_list = list(history_list)\n
history_list.reverse()\n
\n
for history_line in history_list:\n
if history_line.has_key(\'assigned_group\') and history_line[\'assigned_group\']:\n
last_group = history_line[\'assigned_group\']\n
last_function = history_line[\'assigned_function\']\n
......@@ -159,17 +167,25 @@ return []\n
<string>user_name</string>
<string>object</string>
<string>portal_type</string>
<string>Products.CMFCore.WorkflowCore</string>
<string>WorkflowException</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_workflow</string>
<string>history_list</string>
<string>list</string>
<string>None</string>
<string>_getiter_</string>
<string>last_site</string>
<string>last_group</string>
<string>last_function</string>
<string>last_user</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>y</string>
<string>wf_list</string>
<string>wf_id</string>
<string>history_list</string>
<string>list</string>
<string>history_line</string>
<string>_getitem_</string>
<string>user</string>
......
2008-10-20 fabien
* update ERP5Site_getSecurityFromLatestWorkflowHistory to remove workflow hardcoded value
2008-10-16 fabien
* change css to have all the tabs of the forms (actions) on the right instead of have the first on right and the others in the middle
......
402
\ No newline at end of file
405
\ No newline at end of file
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