[Erp5-report] r33803 fabien - /erp5/trunk/products/ERP5/Document/TransformedResource.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 17 15:29:41 CET 2010
Author: fabien
Date: Wed Mar 17 15:29:40 2010
New Revision: 33803
URL: http://svn.erp5.org?rev=33803&view=rev
Log:
revert r33746 and r33775 as it break previous behaviour :
transformation.getAggregatedAmountList was not returning anything (see attach
test that check this)
Modified:
erp5/trunk/products/ERP5/Document/TransformedResource.py
Modified: erp5/trunk/products/ERP5/Document/TransformedResource.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformedResource.py?rev=33803&r1=33802&r2=33803&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformedResource.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformedResource.py [utf8] Wed Mar 17 15:29:40 2010
@@ -263,25 +263,6 @@
quantity = float(quantity)
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
More information about the Erp5-report
mailing list