Commit 31c5de40 authored by Romain Courteaud's avatar Romain Courteaud

Revert previous patch, which is not generic enough.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14999 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72e52429
...@@ -1249,9 +1249,9 @@ class BasicStructure: ...@@ -1249,9 +1249,9 @@ class BasicStructure:
select_expression = '' select_expression = ''
# now iterating through report_tree_list # now iterating through report_tree_list
# LOG('PlanningBox, build', 0, 'report_tree_list %s' % len(report_tree_list)) # LOG('PlanningBox, build', 0, 'report_tree_list %s' % len(report_tree_list))
for object_tree_line in report_tree_list: for object_tree_line in report_tree_list:
# LOG('PlanningBox, build', 0, 'object_tree_line %s' % str(object_tree_line)) # LOG('PlanningBox, build', 0, 'object_tree_line %s' % str(object_tree_line))
# prepare query by defining selection report object # prepare query by defining selection report object
# defining info_dict, holding all information about the current object. # defining info_dict, holding all information about the current object.
info_dict = None info_dict = None
...@@ -1754,6 +1754,7 @@ class BasicGroup: ...@@ -1754,6 +1754,7 @@ class BasicGroup:
*BasicGroup instance itself can hold other BasicGroups in case of *BasicGroup instance itself can hold other BasicGroups in case of
ReportTree mode to handle child groups. ReportTree mode to handle child groups.
""" """
def __init__ (self, title='', name='',url='', constraints='', depth=0, def __init__ (self, title='', name='',url='', constraints='', depth=0,
position=0, field = None, object = None, is_open=0, position=0, field = None, object = None, is_open=0,
is_pure_summary=1, secondary_axis_start=None, is_pure_summary=1, secondary_axis_start=None,
...@@ -1928,14 +1929,7 @@ class BasicGroup: ...@@ -1928,14 +1929,7 @@ class BasicGroup:
stat_context.absolute_url = \ stat_context.absolute_url = \
lambda x: activity_content.getObject().absolute_url() lambda x: activity_content.getObject().absolute_url()
object = stat_context.getObject() object = stat_context.getObject()
# Defining bloc url url = object.getUrl()
if getattr(object, 'isMovement', 0) and \
getattr(object, 'getExplanationValue', 0):
explanation = object.getExplanationValue()
else:
explanation = object
if explanation is not None:
url = '%s/view' % (explanation.getUrl())
# XXX should define height of block here # XXX should define height of block here
height = None height = None
...@@ -1950,6 +1944,7 @@ class BasicGroup: ...@@ -1950,6 +1944,7 @@ class BasicGroup:
error=error, error=error,
property_dict=self.property_dict) property_dict=self.property_dict)
# adding new activity to personal group activity list # adding new activity to personal group activity list
try: try:
self.basic_activity_list.append(activity) self.basic_activity_list.append(activity)
...@@ -2027,14 +2022,7 @@ class BasicGroup: ...@@ -2027,14 +2022,7 @@ class BasicGroup:
height = None height = None
# get object url, not group url # get object url, not group url
object = self.object.getObject() url = self.object.getObject().getUrl()
if getattr(object, 'isMovement', 0) and \
getattr(object, 'getExplanationValue', 0):
explanation = object.getExplanationValue()
else:
explanation = object
if explanation is not None:
url = '%s/view' % (explanation.getUrl())
# creating new activity instance # creating new activity instance
activity=BasicActivity(title=info['info_center'], name=name, activity=BasicActivity(title=info['info_center'], name=name,
...@@ -2054,10 +2042,9 @@ class BasicGroup: ...@@ -2054,10 +2042,9 @@ class BasicGroup:
self.basic_activity_list.append(activity) self.basic_activity_list.append(activity)
class BasicActivity: class BasicActivity:
""" """ Represents an activity, a task, in the group it belongs to. Beware
Represents an activity, a task, in the group it belongs to. Beware nothing about multitask rendering. """
nothing about multitask rendering.
"""
def __init__ (self, title='', name='',object = None, url='', def __init__ (self, title='', name='',object = None, url='',
absolute_begin=None, absolute_end=None, absolute_start=None, absolute_begin=None, absolute_end=None, absolute_start=None,
absolute_stop=None, height=None, constraints='', color=None, absolute_stop=None, height=None, constraints='', color=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment