Commit ff38b50a authored by Jean-Paul Smets's avatar Jean-Paul Smets

Use of getTypeBasedMethod


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3524 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27df6c95
......@@ -337,17 +337,7 @@ class XMLMatrix(Folder):
asCellRange scripts should be unified if possible
"""
script_name_end = '_asCellRange'
if script_id is not None:
script = getattr(self, script_id)
else:
for script_name_begin in [self.getPortalType(), self.getMetaType(),
self.__class__.__name__]:
script_name = join([replace(script_name_begin, ' ', ''),
script_name_end], '')
if hasattr(self, script_name):
script = getattr(self, script_name)
break
script = self._getTypeBasedMethod('asCellRange')
try:
cell_range = script(base_id=base_id,matrixbox=0)
except UnboundLocalError:
......
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