From 322e5e69853f38684bd1d9251bb06c8c8e63717e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 27 Oct 2017 08:34:51 +0200
Subject: [PATCH] item: disable sorting by source_title on Item_viewTracking

If we leave sort_column empty, catalog/listbox will incorrectly guess
the sortable columns.

There is a related key for source_title that does not work here (because
this method selects movements, and movements categories are not indexed,
so lines which acquire source from their parent are filtered out)
---
 .../erp5_item/Item_viewTrackingList/listbox.xml    | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewTrackingList/listbox.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewTrackingList/listbox.xml
index f92d758f2c..a4f9b3b57f 100644
--- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewTrackingList/listbox.xml
+++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewTrackingList/listbox.xml
@@ -12,7 +12,7 @@
               <list>
                 <string>columns</string>
                 <string>list_method</string>
-                <string>sort</string>
+                <string>sort_columns</string>
                 <string>title</string>
                 <string>url_columns</string>
               </list>
@@ -137,12 +137,20 @@
                     </value>
                 </item>
                 <item>
-                    <key> <string>sort</string> </key>
+                    <key> <string>sort_columns</string> </key>
                     <value>
                       <list>
+                        <tuple>
+                          <string>translated_portal_type</string>
+                          <string>Type</string>
+                        </tuple>
                         <tuple>
                           <string>date</string>
-                          <string>ascending</string>
+                          <string>Date</string>
+                        </tuple>
+                        <tuple>
+                          <string>simulation_state</string>
+                          <string>State</string>
                         </tuple>
                       </list>
                     </value>
-- 
2.30.9