Commit a2977c9e authored by Julien Muchembled's avatar Julien Muchembled

Fix test_Item_getVariationRangeCategoryItemList

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28781 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44ed5ee0
...@@ -220,10 +220,9 @@ class Amount(Base, Variated): ...@@ -220,10 +220,9 @@ class Amount(Base, Variated):
self._setVariationValue(variation_value) self._setVariationValue(variation_value)
self.reindexObject() self.reindexObject()
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation, \
'getVariationRangeCategoryItemList') 'getVariationRangeCategoryItemList')
def getVariationRangeCategoryItemList(self, base_category_list=(), def getVariationRangeCategoryItemList(self, *args, **kw):
display_id='getTitleOrId', base=1, current_category=None, **kw):
""" """
Returns possible variation category values for the Returns possible variation category values for the
order line according to the default resource. order line according to the default resource.
...@@ -233,16 +232,9 @@ class Amount(Base, Variated): ...@@ -233,16 +232,9 @@ class Amount(Base, Variated):
menus. menus.
""" """
resource = self.getResourceValue() resource = self.getResourceValue()
if resource is not None: if resource is None:
kw['omit_individual_variation'] = 0 return []
result = resource.getVariationCategoryItemList( return resource.getVariationCategoryItemList(*args, **kw)
base_category_list=base_category_list,
display_id=display_id,
base=base,
current_category=current_category, **kw)
else:
result = []
return result
security.declareProtected(Permissions.AccessContentsInformation, \ security.declareProtected(Permissions.AccessContentsInformation, \
'getVariationRangeCategoryList') 'getVariationRangeCategoryList')
......
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