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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 3 18:00:51 CEST 2006


Author: thomas
Date: Wed May  3 18:00:40 2006
New Revision: 7069

URL: http://svn.erp5.org?rev=7069&view=rev
Log:
fix bug when changing representation type ('parent' to something else)
updated PLanningProperties to specify number of delimiters to generate for
the secondary axis

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=7069&r1=7068&r2=7069&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/PlanningBox.py (original)
+++ erp5/trunk/products/ERP5Form/PlanningBox.py Wed May  3 18:00:40 2006
@@ -95,7 +95,7 @@
     planning_coordinates = planning_coordinates_method(structure=structure)
 
     ##################################################
-    ########## RECOVERING BLOK MOVED DICT ############
+    ########## RECOVERING BLOCK MOVED DICT ###########
     ##################################################
     #  converting string to a structure
     block_moved_list = []
@@ -368,9 +368,9 @@
 
   property_names = Widget.Widget.property_names +\
   ['representation_type','main_axis_groups','size_header_height', 'size_border_width_left',
-  'size_planning_width', 'size_y_axis_width','size_y_axis_space','size_planning_height','size_x_axis_height',
-  'size_x_axis_space'
-  ,'list_method','report_root_list','selection_name',
+   'size_planning_width', 'size_y_axis_width','size_y_axis_space','size_planning_height','size_x_axis_height',
+   'size_x_axis_space', 'delimiter',
+   'list_method','report_root_list','selection_name',
    'portal_types','sort','title_line','x_start_bloc','x_stop_bloc',
    'y_axis_method','constraint_method','color_script','info_center',
    'info_topleft','info_topright','info_backleft','info_backright',
@@ -506,6 +506,12 @@
       description=("space between each line of the graphic,not required"),
       default=10,
       required=0)
+      
+  delimiter = fields.IntegerField('delimiter',
+      title='number of delimiters over the secondary axis:',
+      description=("number of delimitations over the sec axis, required"),
+      default = 5,
+      required=1)
 
 
 
@@ -997,7 +1003,7 @@
           kw['select_expression'] = original_select_expression
 
       if (object_tree_line.getIsPureSummary() and \
-         selection_report_path[0]=='parent'):
+         selection_report_path=='parent'):
         # object_tree_line is Pure summary : does not have any activity
         stat_result = {}
         index=1
@@ -1691,7 +1697,7 @@
     #pdb.set_trace()
     # call method to build secondary axis structure
     # need start_bound, stop_bound and number of groups to build
-    self.buildSecondaryAxis(basic_structure)
+    self.buildSecondaryAxis(basic_structure,field)
 
 
     # completing axisgroup informations according to their bounds
@@ -1704,7 +1710,7 @@
     self.buildBlocs()
 
 
-  def buildSecondaryAxis(self,basic_structure):
+  def buildSecondaryAxis(self,basic_structure, field):
     """
     build secondary axis structure
     """
@@ -1753,7 +1759,7 @@
     # getting secondary axis script generator
     planning_secondary_axis_method = getattr(basic_structure.here,'planning_secondary_axis')
     # calling script to generate axis_group_list
-    group_list = planning_secondary_axis_method(self.secondary_axis.start, self.secondary_axis.stop, 4)
+    group_list = planning_secondary_axis_method(self.secondary_axis.start, self.secondary_axis.stop, field.get_value('delimiter'))
     axis_group_number = 0
     for group_title in group_list:
       # adding new group to list of groups




More information about the Erp5-report mailing list