From 2baa5cd154cea999aecff31a1fe9b8c93f47d17b Mon Sep 17 00:00:00 2001 From: Maxime Richez Date: Tue, 22 Sep 2020 10:18:39 +0200 Subject: [PATCH] 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 --- tryton/gui/window/view_form/view/list.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tryton/gui/window/view_form/view/list.py b/tryton/gui/window/view_form/view/list.py index 137b1e0125..d38e25363f 100644 --- a/tryton/gui/window/view_form/view/list.py +++ b/tryton/gui/window/view_form/view/list.py @@ -536,6 +536,7 @@ class ViewTree(View): 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'),