[Erp5-report] r16768 - /erp5/trunk/products/ERP5/Document/PackingList.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 2 10:56:18 CEST 2007
Author: alex
Date: Tue Oct 2 10:56:17 2007
New Revision: 16768
URL: http://svn.erp5.org?rev=16768&view=rev
Log:
use getQuantity() instead of accessing quantity directly (returns the default
property value instead of raising AttributeError)
Modified:
erp5/trunk/products/ERP5/Document/PackingList.py
Modified: erp5/trunk/products/ERP5/Document/PackingList.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PackingList.py?rev=16768&r1=16767&r2=16768&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PackingList.py (original)
+++ erp5/trunk/products/ERP5/Document/PackingList.py Tue Oct 2 10:56:17 2007
@@ -112,8 +112,8 @@
'has_cell_content': 0,
}
container_mvt_list = self.portal_catalog(**query_kw)
- packed_quantity = sum([x.quantity for x in container_mvt_list \
- if x.quantity is not None])
+ packed_quantity = sum([x.getQuantity() for x in container_mvt_list \
+ if x.getQuantity() is not None])
if quantity != packed_quantity:
return 0
More information about the Erp5-report
mailing list