[Erp5-report] r15807 - /erp5/trunk/products/ERP5Form/PlanningBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Aug 26 20:49:38 CEST 2007


Author: rafael
Date: Sun Aug 26 20:49:37 2007
New Revision: 15807

URL: http://svn.erp5.org?rev=15807&view=rev
Log:

Reduce the number of raises in order to show empty PlanningBox 
instead errors from configuration.


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

Modified: erp5/trunk/products/ERP5Form/PlanningBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/PlanningBox.py?rev=15807&r1=15806&r2=15807&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/PlanningBox.py (original)
+++ erp5/trunk/products/ERP5Form/PlanningBox.py Sun Aug 26 20:49:37 2007
@@ -1109,7 +1109,7 @@
     self.selection_name = selection_name
     self.report_root_list = report_root_list
     self.portal_types = portal_types
-    self.basic_group_list = None
+    self.basic_group_list = []
     # needed to generate groups
     self.report_groups= ''
     self.list_error = list_error
@@ -1261,9 +1261,9 @@
                                     sort_on=self.selection.sort_on,
                                     form_id=self.form.id)
 
-    if report_tree_list == []:
-      raise PlanningBoxError, "Report tree list is empty on %s" % \
-        self.field.absolute_url()
+    #if report_tree_list == []:
+      #raise PlanningBoxError, "Report tree list is empty on %s" % \
+      #  self.field.absolute_url()
 
 
     ##################################################
@@ -1460,11 +1460,12 @@
       self.report_groups=self.report_groups[self.main_axis_info['bound_start']:
                                             self.main_axis_info['bound_stop']]
     else:
+      pass
       # no group is available so the Y and X axis will be empty...
-      raise PlanningBoxError, \
-          'selection method returned empty list of objects : please check' \
-          'list_method and report_root of %s' % \
-          self.field.absolute_url()
+      #raise PlanningBoxError, \
+      #    'selection method returned empty list of objects : please check' \
+      #    'list_method and report_root of %s' % \
+      #    self.field.absolute_url()
 
     ##################################################
     ############ GETTING SEC AXIS BOUNDS #############
@@ -1820,7 +1821,7 @@
     self.title = title
     self.name = name
     self.url = url
-    self.basic_group_list = None # used with ReportTree
+    self.basic_group_list = [] # used with ReportTree
     self.basic_activity_list = None # bloc activities
     self.constraints = constraints# global contraints applying to all group
     self.depth = depth # depth of the actual group (report_tree mode)




More information about the Erp5-report mailing list