[Erp5-report] r28781 - /erp5/trunk/products/ERP5/Document/Amount.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Sep 3 14:42:10 CEST 2009


Author: jm
Date: Thu Sep  3 14:42:08 2009
New Revision: 28781

URL: http://svn.erp5.org?rev=28781&view=rev
Log:
Fix test_Item_getVariationRangeCategoryItemList

Modified:
    erp5/trunk/products/ERP5/Document/Amount.py

Modified: erp5/trunk/products/ERP5/Document/Amount.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Amount.py?rev=28781&r1=28780&r2=28781&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Amount.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Amount.py [utf8] Thu Sep  3 14:42:08 2009
@@ -220,10 +220,9 @@
     self._setVariationValue(variation_value)
     self.reindexObject()
 
-  security.declareProtected(Permissions.AccessContentsInformation,
+  security.declareProtected(Permissions.AccessContentsInformation, \
                             'getVariationRangeCategoryItemList')
-  def getVariationRangeCategoryItemList(self, base_category_list=(),
-      display_id='getTitleOrId', base=1, current_category=None, **kw):
+  def getVariationRangeCategoryItemList(self, *args, **kw):
     """
       Returns possible variation category values for the
       order line according to the default resource.
@@ -233,16 +232,9 @@
       menus.
     """
     resource = self.getResourceValue()
-    if resource is not None:
-      kw['omit_individual_variation'] = 0
-      result = resource.getVariationCategoryItemList(
-                               base_category_list=base_category_list,
-                               display_id=display_id,
-                               base=base,
-                               current_category=current_category, **kw)
-    else:
-      result = []
-    return result
+    if resource is None:
+      return []
+    return resource.getVariationCategoryItemList(*args, **kw)
 
   security.declareProtected(Permissions.AccessContentsInformation, \
                             'getVariationRangeCategoryList')




More information about the Erp5-report mailing list