[Erp5-report] r18766 - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 17 13:51:38 CET 2008


Author: seb
Date: Thu Jan 17 13:51:37 2008
New Revision: 18766

URL: http://svn.erp5.org?rev=18766&view=rev
Log:
Modify the way ListBoxListRenderer.render works :
- do not add +1 to the depth, take the depth calculated by getReportSectionList
- take the domain_title already calculated into getReportSectionList

Modified:
    erp5/trunk/products/ERP5Form/ListBox.py

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=18766&r1=18765&r2=18766&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py Thu Jan 17 13:51:37 2008
@@ -2255,14 +2255,12 @@
 
       if line.isSummary():
         listboxline.markSummaryLine()
-        # XXX What is this "+ 1"?
-        listboxline.setSectionDepth(line.getDepth() + 1)
-        context = line.getContext()
-        if context is not None:
-          section_name = context.getTitleOrId() or None
-        else:
-          section_name = None
-        listboxline.setSectionName(section_name)
+        # XXX It was line.getDepth()+1 before, but
+        # it probably make no sense so I (seb) removed this
+        listboxline.setSectionDepth(line.getDepth())
+        # Do not get the context again, it was already computed
+        # in getReportSectionList
+        listboxline.setSectionName(line.domain_title)
         listboxline.setSectionFolded(not line.isOpen())
 
       if line.getBrain() is not None:




More information about the Erp5-report mailing list