changeset 75ff176876c4 in tryton:5.6
details: https://hg.tryton.org/tryton?cmd=changeset;node=75ff176876c4
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
        (grafted from 388550da810a4f341d5f9fe6f2d528e5dcd3de21)
diffstat:

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

diffs (11 lines):

diff -r 384bc1883995 -r 75ff176876c4 tryton/gui/window/view_form/view/list.py
--- a/tryton/gui/window/view_form/view/list.py  Wed Sep 02 19:12:42 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