Commit dfac1171 authored by Sebastien Robin's avatar Sebastien Robin

getVariationBaseCategoryItemList should display title or id


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2842 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 00fd450b
...@@ -111,14 +111,15 @@ class Transformation(XMLObject, Domain, Variated): ...@@ -111,14 +111,15 @@ class Transformation(XMLObject, Domain, Variated):
return result return result
security.declareProtected(Permissions.AccessContentsInformation, 'getVariationRangeBaseCategoryItemList') security.declareProtected(Permissions.AccessContentsInformation, 'getVariationRangeBaseCategoryItemList')
def getVariationRangeBaseCategoryItemList(self): def getVariationRangeBaseCategoryItemList(self,display_id='title_or_id',**kw):
""" """
Returns possible variations of the transformation Returns possible variations of the transformation
as a list of tuples (id, title). This is mostly as a list of tuples (id, title). This is mostly
useful in ERP5Form instances to generate selection useful in ERP5Form instances to generate selection
menus. menus.
""" """
return self.portal_categories.getItemList( self.getVariationRangeBaseCategoryList() ) return self.portal_categories.getItemList( self.getVariationRangeBaseCategoryList(),
display_id=display_id,**kw )
security.declareProtected(Permissions.AccessContentsInformation,'getVariationRangeCategoryList') security.declareProtected(Permissions.AccessContentsInformation,'getVariationRangeCategoryList')
...@@ -173,11 +174,12 @@ class Transformation(XMLObject, Domain, Variated): ...@@ -173,11 +174,12 @@ class Transformation(XMLObject, Domain, Variated):
return result return result
security.declareProtected(Permissions.AccessContentsInformation, 'getVariationBaseCategoryItemList') security.declareProtected(Permissions.AccessContentsInformation, 'getVariationBaseCategoryItemList')
def getVariationBaseCategoryItemList(self): def getVariationBaseCategoryItemList(self,display_id='title_or_id',**kw):
""" """
Returns a list of base_category tuples for this tranformation Returns a list of base_category tuples for this tranformation
""" """
return self.portal_categories.getItemList(self.getVariationBaseCategoryList()) return self.portal_categories.getItemList(self.getVariationBaseCategoryList(),
display_id=display_id,**kw)
security.declareProtected(Permissions.AccessContentsInformation, '_setVariationBaseCategoryList') security.declareProtected(Permissions.AccessContentsInformation, '_setVariationBaseCategoryList')
......
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