From 4aa3d3b223508beb6e9817528e1a33e9f372a04a Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Wed, 17 Mar 2010 14:29:40 +0000
Subject: [PATCH] revert r33746 and r33775 as it break previous behaviour :
 transformation.getAggregatedAmountList was not returning anything (see attach
 test that check this)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33803 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/TransformedResource.py | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/product/ERP5/Document/TransformedResource.py b/product/ERP5/Document/TransformedResource.py
index d5fad98c47..c59731d5ba 100644
--- a/product/ERP5/Document/TransformedResource.py
+++ b/product/ERP5/Document/TransformedResource.py
@@ -264,25 +264,6 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount):
         except ValueError:
           error_string += 'Quantity is not a float.'
 
-        # If IAmount specifies that 4 resources are needed, all quantities
-        # need to be multiplicated by 4...
-        context_quantity = None
-        quantity_getter = getattr(context, "getQuantity", None)
-        if quantity_getter is not None:
-          _marker = object()
-          context_quantity = quantity_getter(_marker)
-          if context_quantity is _marker:
-            # XXX Backwards compatibility:
-            # previously, quantity property of the Amount was completely
-            # ignored, and was assumed to be 1.0 . Re-enact this old
-            # behavior (quantity default value is 0.0) to avoid breakages
-            warn("No quantity was defined on the Amount passed to " \
-                 "getAggregatedAmountList, 1.0 was assumed", DeprecationWarning)
-            context_quantity = 1.0
-        else:
-          raise KeyError("No quantity defined on context")
-        quantity *= float(context_quantity)
-
         # Get the variation category list
         variation_category_list_defined_by = None
         variation_category_list = None
-- 
2.30.9