From a6e707823d25c5443c8eb6ec9925ce7fb1aeea78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Sat, 28 Jan 2006 16:11:57 +0000
Subject: [PATCH] in report tree, display title_or_id instead of only title to
 make sure we always have a link.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5406 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/ListBox.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/product/ERP5Form/ListBox.py b/product/ERP5Form/ListBox.py
index db1aae5585..3d856ddfad 100755
--- a/product/ERP5Form/ListBox.py
+++ b/product/ERP5Form/ListBox.py
@@ -1001,11 +1001,11 @@ class ListBoxWidget(Widget.Widget):
               absolute_url_txt = s[0].absolute_url()
               stat_context.absolute_url = lambda: absolute_url_txt
               stat_context.domain_url = s[0].getRelativeUrl()
-              section_title = s[0].getTitle()
+              section_title = s[0].getTitleOrId()
               section_title = CT_(section_title, default=section_title.decode('utf-8'))
               if type(section_title) == type(u''):
                 section_title = section_title.encode('utf-8')
-              report_sections += [(s[0].getTitle(), 1, s[2], [stat_context], 1, s[3], s[4], stat_context, 0)]
+              report_sections += [(s[0].getTitleOrId(), 1, s[2], [stat_context], 1, s[3], s[4], stat_context, 0)]
               #                 report id, is_summary, depth, object_list, object_list_len, XX, XX, report_object, start, stop
             else:
               # Prepare query
@@ -1044,15 +1044,15 @@ class ListBoxWidget(Widget.Widget):
                 if object_list_len and s[3]:
                   # Display object data at same level as category selector
                   # If this domain is open
-                  report_sections += [ (s[0].getTitle(), 0, s[2], [object_list[0]], 1, s[3], s[4], stat_context, 0) ]
+                  report_sections += [ (s[0].getTitleOrId(), 0, s[2], [object_list[0]], 1, s[3], s[4], stat_context, 0) ]
                   report_sections += [ (None, 0, s[2], object_list, object_list_len - 1, s[3], s[4], None, 1) ]
                 else:
                   if exception_uid_list is not None:
                     # Display current parent domain
-                    report_sections += [ (s[0].getTitle(), 0, s[2], [s[0]], 1, s[3], s[4], stat_context, 0) ]
+                    report_sections += [ (s[0].getTitleOrId(), 0, s[2], [s[0]], 1, s[3], s[4], stat_context, 0) ]
                   else:
                     # No data to display
-                    report_sections += [ (s[0].getTitle(), 0, s[2], [None], 1, s[3], s[4], stat_context, 0) ]
+                    report_sections += [ (s[0].getTitleOrId(), 0, s[2], [None], 1, s[3], s[4], stat_context, 0) ]
 
           # Reset original value
           selection.edit(report = None)
-- 
2.30.9