Commit 0c194b20 authored by Jérome Perrin's avatar Jérome Perrin

item: Directly sort the output of Item_getTrackingList by date

Some listboxs using it were using default_sort to inject this
automatically, but it's better to do this directly in the script, this
way the script can be reused.

I'm not really convinced the script should honor sort_on parameter
received in kw, because misconfigured listbox can inject some parameters
that would cause more table to be joined.
parent bc2ef92a
......@@ -5,7 +5,8 @@ if current:
else:
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 = []
for brain in method(aggregate_uid=context.getUid(), **kw):
......
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