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:
select_expression = ''
# 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:
# 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
# defining info_dict, holding all information about the current object.
info_dict = None
......@@ -1754,6 +1754,7 @@ class BasicGroup:
*BasicGroup instance itself can hold other BasicGroups in case of
ReportTree mode to handle child groups.
"""
def __init__ (self, title='', name='',url='', constraints='', depth=0,
position=0, field = None, object = None, is_open=0,
is_pure_summary=1, secondary_axis_start=None,
......@@ -1928,14 +1929,7 @@ class BasicGroup:
stat_context.absolute_url = \
lambda x: activity_content.getObject().absolute_url()
object = stat_context.getObject()
# Defining bloc url
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())
url = object.getUrl()
# XXX should define height of block here
height = None
......@@ -1949,7 +1943,8 @@ class BasicGroup:
color=current_color, info_dict=info,
error=error,
property_dict=self.property_dict)
# adding new activity to personal group activity list
try:
self.basic_activity_list.append(activity)
......@@ -2027,14 +2022,7 @@ class BasicGroup:
height = None
# get object url, not group url
object = self.object.getObject()
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())
url = self.object.getObject().getUrl()
# creating new activity instance
activity=BasicActivity(title=info['info_center'], name=name,
......@@ -2054,10 +2042,9 @@ class BasicGroup:
self.basic_activity_list.append(activity)
class BasicActivity:
"""
Represents an activity, a task, in the group it belongs to. Beware
nothing about multitask rendering.
"""
""" Represents an activity, a task, in the group it belongs to. Beware
nothing about multitask rendering. """
def __init__ (self, title='', name='',object = None, url='',
absolute_begin=None, absolute_end=None, absolute_start=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