diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index 63338ccf66d8d21a634b3b2240c8e3678c9fcca8..2b4e1a6e699354694618ac2a774a493e6f2b21c4 100644 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -77,6 +77,8 @@ def sortValueList(value_list, sort_on=None, sort_order=None, **kw): sort_on = tuple([isinstance(x, str) and x or tuple(x) for x in sort_on]) try: sort_kw = sort_kw_cache[sort_on] + if sort_order is not None: + sort_kw["reverse"] = (sort_order in ('descending', 'reverse', 'DESC')) except KeyError: new_sort_on = [] reverse_dict = {}