[Erp5-report] r33446 nicolas.dumazet - /erp5/trunk/products/ERP5/Document/Transformation.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Mar 5 14:47:03 CET 2010
Author: nicolas.dumazet
Date: Fri Mar 5 14:47:02 2010
New Revision: 33446
URL: http://svn.erp5.org?rev=33446&view=rev
Log:
Fix an error of testLegacyProductionOrder.
When a Transformed Resource is not properly configured, getAggregatedAmountList
can raise a KeyError, which will abort transformation interaction activities.
It's okay to skip the line, really: it's just misconfigured.
Modified:
erp5/trunk/products/ERP5/Document/Transformation.py
Modified: erp5/trunk/products/ERP5/Document/Transformation.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Transformation.py?rev=33446&r1=33445&r2=33446&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Transformation.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Transformation.py [utf8] Fri Mar 5 14:47:02 2010
@@ -303,7 +303,13 @@
# Browse each transformed or assorted resource of the current
# transformation
if line_is_included(transformation_line):
- result.extend(transformation_line.getAggregatedAmountList(context))
+ try:
+ result.extend(transformation_line.getAggregatedAmountList(context))
+ except KeyError:
+ # KeyError is raised by TransformedResource.getAggregatedAmountList
+ # in case of misconfiguration of a Cell.
+ # Just ignore the line
+ pass
if context_quantity:
result.multiplyQuantity(context=context)
More information about the Erp5-report
mailing list