diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getWorkflowEventInfoList.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getWorkflowEventInfoList.xml new file mode 100644 index 0000000000000000000000000000000000000000..0e2cda344eb38ada52ced563e170aa44f4659d4e --- /dev/null +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/Base_getWorkflowEventInfoList.xml @@ -0,0 +1,162 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""\n + Return a merge list of all workflow history sorted by time.\n + Result is returned as a sorted list of tempobject (returned by\n + Base_getWorkflowHistoryItemList).\n + This script can easily be used as list method by a listbox\n +"""\n +\n +from Products.CMFCore.WorkflowCore import WorkflowException\n +history = {}\n +workflow_id_list = [workflow_id for workflow_id, workflow_state in context.getWorkflowStateItemList()]\n +for wf_id in workflow_id_list:\n + try:\n + history[wf_id]=context.Base_getWorkflowHistoryItemList(workflow_id=wf_id)\n + except WorkflowException:\n + # some workflow don\'t have history\n + pass\n +\n +event_list = []\n +for worrkflow_id in history.keys():\n + event_list += history[worrkflow_id]\n +if sort: event_list.sort(key=lambda x:x.time, reverse=True)\n +return event_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>sort=1</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>sort</string> + <string>Products.CMFCore.WorkflowCore</string> + <string>WorkflowException</string> + <string>history</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>_getattr_</string> + <string>context</string> + <string>workflow_id</string> + <string>workflow_state</string> + <string>workflow_id_list</string> + <string>wf_id</string> + <string>_write_</string> + <string>event_list</string> + <string>worrkflow_id</string> + <string>_inplacevar_</string> + <string>_getitem_</string> + <string>True</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <int>1</int> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Base_getWorkflowEventInfoList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision index f0e941681be5d158c614f8409e58b57476f2f9f4..6d706ee9468b3e8a460e59b0fe78008ee1d70cb3 100644 --- a/bt5/erp5_web/bt/revision +++ b/bt5/erp5_web/bt/revision @@ -1 +1 @@ -891 \ No newline at end of file +892 \ No newline at end of file