Commit 752e6907 authored by Yoshinori Okuji's avatar Yoshinori Okuji

getVariationCategoryList added into Amount


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@214 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 06041b2b
......@@ -128,7 +128,22 @@ class Amount(Base, Variated):
return self.getDefaultResourceValue().getVariationCategoryItemList(
base_category_list, method_id=method_id, base=base, start_with_item=start_with_item)
except:
return self.portal_categories.getBaseItemList()
# FIXME: method_name vs. method_id, start_with_item vs. start_with_empty, etc. -yo
return self.portal_categories.getCategoryChildItemList()
security.declareProtected(Permissions.AccessContentsInformation,
'getVariationRangeCategoryList')
def getVariationRangeCategoryList(self, base_category_list = (), base=1):
"""
Returns possible categories for this amount ie.
the variation of the resource (not the variation range)
"""
try:
# FIXME: no base argument in getVariationCategoryList -yo
return self.getDefaultResourceValue().getVariationCategoryList(base_category_list=base_category_list)
except:
# FIXME: method_name vs. method_id, etc. -yo
return self.portal_categories.getCategoryChildList()
security.declareProtected(Permissions.AccessContentsInformation,
'getVariationRangeBaseCategoryList')
......
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