Commit c4dd2876 authored by Rafael Monnerat's avatar Rafael Monnerat

Added one parameter to filter the portal type in the list method.

This commit should only effect the Planning Box.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13445 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3ef755d6
......@@ -1003,7 +1003,6 @@ class PlanningBoxWidget(Widget.Widget):
params = selection.getParams()
except (AttributeError,KeyError):
params = {}
###### CALL CLASS METHODS TO BUILD BASIC STRUCTURE ######
# creating BasicStructure instance (and initializing its internal values)
self.basic = BasicStructure(here=here,form=form, field=field,
......@@ -1203,7 +1202,9 @@ class BasicStructure:
unfolded_list=selection_report_current,
selection_name=self.selection_name,
report_depth=report_depth,
list_method=self.list_method,
list_method=self.list_method,
filtered_portal_types= \
self.filtered_portal_types,
is_report_opened=is_report_opened,
sort_on=self.selection.sort_on,
form_id=self.form.id)
......@@ -1664,6 +1665,7 @@ class BasicStructure:
# updating position_informations
position +=1
# recovering usefull informations, basic_structure
# XXX should be used title_lines method
title = report_group_object.getObject().getTitle()
name = report_group_object.getObject().getTitle()
depth = report_group_object.getDepth()
......@@ -2122,7 +2124,6 @@ class PlanningStructure:
axis_stop = (self.secondary_axis.stop)
axis_start = (self.secondary_axis.start)
axis_script=getattr(basic_structure.here,
basic_structure.field.get_value('sec_axis_script'),None)
if axis_script == None:
......
......@@ -114,7 +114,6 @@ class SelectionTool( UniqueObject, SimpleItem ):
if query_string is not None:
LOG('SelectionTool', 0, 'DEPRECATED: _redirectToOriginalForm got called with a query_string. The variables must be passed in REQUEST.form.')
context = REQUEST['PARENTS'][0]
form_id = dialog_id or REQUEST.get('dialog_id', None) or form_id or REQUEST.get('form_id', 'view')
return getattr(context, form_id)()
......@@ -1318,7 +1317,7 @@ class TreeListLine:
def makeTreeList(here, form, root_dict, report_path, base_category,
depth, unfolded_list, form_id, selection_name,
report_depth, is_report_opened=1, list_method=None,
sort_on = (('id', 'ASC'),)):
filtered_portal_types=[] ,sort_on = (('id', 'ASC'),)):
"""
(object, is_pure_summary, depth, is_open, select_domain_dict)
......@@ -1374,7 +1373,7 @@ def makeTreeList(here, form, root_dict, report_path, base_category,
# If this is a folder, try to browse the hierarchy
object_list = root.searchFolder(sort_on=sort_on)
elif hasattr(aq_base(root), list_method.__name__ ):
object_list = list_method()
object_list = list_method(portal_type=filtered_portal_types)
else:
object_list = []
for zo in object_list:
......
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