Commit 7786cf4e authored by Rafael Monnerat's avatar Rafael Monnerat

Fix for blocs when use report domains.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13946 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee271744
...@@ -1289,7 +1289,22 @@ class BasicStructure: ...@@ -1289,7 +1289,22 @@ class BasicStructure:
# recovering exeption_uid_list # recovering exeption_uid_list
exception_uid_list = object_tree_line.getExceptionUidList() exception_uid_list = object_tree_line.getExceptionUidList()
if exception_uid_list is not None: # XXX filter the object to the right domain.
# Can be improved in future.
domain_obj = object_tree_line.getObject()
new_object_list = []
if domain_obj.getPortalType() == 'Domain':
category_obj = domain_obj.getMembershipCriterionCategory()
membership_base_category = domain_obj.getMembershipCriterionBaseCategory()
if (category_obj is not None) and (membership_base_category is not None):
category_value = (membership_base_category + '/' +category_obj.getRelativeUrl())
for selected_object in object_list:
if category_value in selected_object.getCategoriesList():
new_object_list.append(selected_object)
object_list = new_object_list
if exception_uid_list not in ([],None) :
# Filter folders if parent tree : # Filter folders if parent tree :
# build new object_list for current line # build new object_list for current line
# (list of relative elements) # (list of relative elements)
...@@ -1546,9 +1561,10 @@ class BasicStructure: ...@@ -1546,9 +1561,10 @@ class BasicStructure:
message = 'can not find secondary axis bounds for planning view :\ message = 'can not find secondary axis bounds for planning view :\
No object has good start & stop properties, please check your objects \ No object has good start & stop properties, please check your objects \
and their corresponding properties' and their corresponding properties'
#axis_dict['bound_begin'] = 0
#axis_dict['bound_end'] = 1
return 1 #[(Message(domain=None, message=message,mapping=None))] return 1 #[(Message(domain=None, message=message,mapping=None))]
axis_dict['bound_range'] = axis_dict['bound_end'] - axis_dict['bound_begin'] axis_dict['bound_range'] = axis_dict['bound_end'] - axis_dict['bound_begin']
# now start and stop have the extreme values of the second axis bound. # now start and stop have the extreme values of the second axis bound.
# this represents in fact the size of the Planning's secondary axis # this represents in fact the size of the Planning's secondary axis
...@@ -1943,14 +1959,17 @@ class BasicGroup: ...@@ -1943,14 +1959,17 @@ class BasicGroup:
else: else:
block_end = None block_end = None
if secondary_axis_info.has_key('bound_start') and \
secondary_axis_info.has_key('bound_stop'):
# testing if activity is visible according to the current zoom selection # testing if activity is visible according to the current zoom selection
# over the secondary_axis # over the secondary_axis
if block_begin == None: if (block_begin == None):
block_begin = secondary_axis_info['bound_start'] block_begin = secondary_axis_info['bound_start']
current_color='#E4CCE1' current_color='#E4CCE1'
if block_end == None: if block_end == None:
block_end = secondary_axis_info['bound_stop'] block_end = secondary_axis_info['bound_stop']
current_color='#E4CCE1' current_color='#E4CCE1'
if (block_begin > secondary_axis_info['bound_stop'] or \ if (block_begin > secondary_axis_info['bound_stop'] or \
block_end < secondary_axis_info['bound_start']): block_end < secondary_axis_info['bound_start']):
# activity will not be displayed, stopping process # activity will not be displayed, stopping process
......
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