changeset 388550da810a in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=388550da810a
description:
        Set correct direction arrow from order with NULLS extra parameter

        Arrows direction icons in treeview are defined by ASC or DESC keywords. 
When
        using an order with composed sentence eg. "DESC NULLS FIRST", we need to
        extract first word to get arrow direction keyword.

        issue9587
        review296211002
diffstat:

 tryton/gui/window/view_form/view/list.py |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r d7a75abccfa4 -r 388550da810a tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py  Fri Sep 18 00:07:58 2020 +0200
+++ b/tryton/gui/window/view_form/view/list.py  Tue Sep 22 10:18:39 2020 +0200
@@ -536,6 +536,7 @@
         if order and len(order) == 1:
             (name, direction), = order
             if direction:
+                direction = direction.split(None, 1)[0]
                 direction = {
                     'ASC': common.IconFactory.get_pixbuf('tryton-arrow-down'),
                     'DESC': common.IconFactory.get_pixbuf('tryton-arrow-up'),

Reply via email to