Commit d4fc3821 authored by Julien Muchembled's avatar Julien Muchembled

ERP5Form: use decorator syntax to apply lazyMethod on Listbox/PlanningBox methods

parent 1622517c
This diff is collapsed.
......@@ -1222,20 +1222,19 @@ class BasicStructure:
return object_list
@lazyMethod
def getPortalObject(self):
"""Return the portal object.
"""
return self.context.getPortalObject()
getPortalObject = lazyMethod(getPortalObject)
@lazyMethod
def getSelectionTool(self):
"""Return the Selection Tool.
"""
return self.getPortalObject().portal_selections
getSelectionTool = lazyMethod(getSelectionTool)
@lazyMethod
def getPortalTypeList(self):
"""
Return the list of portal types for filtering. Return None when empty.
......@@ -1243,8 +1242,6 @@ class BasicStructure:
portal_types = [c[0] for c in self.field.get_value('portal_types')]
return portal_types or None
getPortalTypeList = lazyMethod(getPortalTypeList)
def getReportGroupList(self, report_tree_list=[], \
sec_layer_method_name=None,show_stat=0):
"""
......
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