Commit 2b143c22 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

erp5_item: Change default sorting of Item_viewTrackingList/listbox

to descending date and move the sorting to Listbox definition
instead of list method
parent 8420c1f4
...@@ -5,9 +5,6 @@ if current: ...@@ -5,9 +5,6 @@ if current:
else: else:
method = portal.portal_simulation.getTrackingList method = portal.portal_simulation.getTrackingList
# tracking list is much more readable if locations are sorted by dates.
kw.setdefault('sort_on', (('date', 'ascending',),))
history_list = [] history_list = []
for brain in method(aggregate_uid=context.getUid(), **kw): for brain in method(aggregate_uid=context.getUid(), **kw):
explanation = brain.getExplanationValue() explanation = brain.getExplanationValue()
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<list> <list>
<string>columns</string> <string>columns</string>
<string>list_method</string> <string>list_method</string>
<string>sort</string>
<string>sort_columns</string> <string>sort_columns</string>
<string>title</string> <string>title</string>
</list> </list>
...@@ -135,6 +136,17 @@ ...@@ -135,6 +136,17 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>date</string>
<string>DESC</string>
</tuple>
</list>
</value>
</item>
<item> <item>
<key> <string>sort_columns</string> </key> <key> <string>sort_columns</string> </key>
<value> <value>
......
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