Commit 3c6fda19 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

erp5_core: Display workflow and ZODB history in desceding sorting

parent cb28a319
......@@ -136,7 +136,7 @@ def getChangeHistoryList(document, size=50, attribute_name=None):
history.extend(_getWorkflowHistory(document, initial_datetime))
history.extend(_getRecordedPropertyHistory(document, size))
history.extend(_getAttributeHistory(document, size, attribute_name))
history.sort(key=lambda x:x['datetime'])
history.sort(key=lambda x:x['datetime'], reverse=True)
return history
......
......@@ -92,4 +92,6 @@ for workflow_item in workflow_item_list:
previous_obj = o
result.append(o)
if reverse:
result.reverse()
return result
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>workflow_id, display=1, **kw</string> </value>
<value> <string>workflow_id, display=1, reverse=False, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
......@@ -11,6 +11,7 @@
<value>
<list>
<string>columns</string>
<string>default_params</string>
<string>editable_columns</string>
<string>list_action</string>
<string>list_method</string>
......@@ -62,6 +63,12 @@
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value> <string></string> </value>
......@@ -74,6 +81,10 @@
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value> <string></string> </value>
......@@ -89,7 +100,7 @@
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
......@@ -144,6 +155,17 @@
</list>
</value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
<list>
<tuple>
<string>checked_permission</string>
<string>View</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>disable_link</string> </key>
<value> <int>0</int> </value>
......@@ -194,7 +216,7 @@
<item>
<key> <string>list_method</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
......@@ -274,12 +296,25 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_selections.getSelectionParams(request.get(\'prefixed_selection_name\', field.get_orig_value(\'selection_name\')))[\'workflow_title\']</string> </value>
<value> <string>python: [(\'checked_permission\', \'View\'), (\'reverse\', True)]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.portal_selections.getSelectionParams(request.get(\'prefixed_selection_name\', field.get_orig_value(\'selection_name\')))[\'workflow_title\']</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="Method" module="Products.Formulator.MethodField"/>
</pickle>
......
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