Commit d68b7217 authored by Rafael Monnerat's avatar Rafael Monnerat

Fixed when the Object does not has the List Method 



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16615 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 356e68f2
...@@ -1166,9 +1166,12 @@ class BasicStructure: ...@@ -1166,9 +1166,12 @@ class BasicStructure:
if 'select_expression' in kw: if 'select_expression' in kw:
del kw['select_expression'] del kw['select_expression']
sec_layer_method_name = None
if getattr(self.sec_layer_list_method, 'method_name', None) is not None: if getattr(self.sec_layer_list_method, 'method_name', None) is not None:
sec_layer_method_name = self.sec_layer_list_method.method_name
self.sec_layer_list_method = getattr( self.context, self.sec_layer_list_method = getattr( self.context,
self.sec_layer_list_method.method_name) sec_layer_method_name, None)
if getattr(self.list_method, 'method_name', None) is not None: if getattr(self.list_method, 'method_name', None) is not None:
if self.list_method.method_name == 'ObjectValues': if self.list_method.method_name == 'ObjectValues':
# list_method is available # list_method is available
...@@ -1287,7 +1290,6 @@ class BasicStructure: ...@@ -1287,7 +1290,6 @@ class BasicStructure:
blocks_object={} blocks_object={}
select_expression = '' select_expression = ''
self.sec_layer_uid_list = [] self.sec_layer_uid_list = []
self.selection.edit(params = kw) self.selection.edit(params = kw)
if self.list_method not in (None,''): if self.list_method not in (None,''):
# valid list_method has been found # valid list_method has been found
...@@ -1335,11 +1337,14 @@ class BasicStructure: ...@@ -1335,11 +1337,14 @@ class BasicStructure:
else: else:
info_dict['stat'] = 0 info_dict['stat'] = 0
domain_obj = object_tree_line.getObject()
sec_layer_object_list = [] sec_layer_object_list = []
if self.selection_report_path == 'parent': if self.selection_report_path == 'parent':
object_list = [object_tree_line.getObject()] object_list = [object_tree_line.getObject()]
if sec_layer_method_name not in (None,''):
sec_layer_object_list = getattr(domain_obj,\
sec_layer_method_name)()
domain_obj = object_tree_line.getObject()
# Default Values # Default Values
new_object_list = [] new_object_list = []
sec_new_object_list = [] sec_new_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