[Erp5-report] r38926 yusei - /erp5/trunk/products/ERP5/Document/Delivery.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 6 15:36:45 CEST 2010
Author: yusei
Date: Wed Oct 6 15:36:40 2010
New Revision: 38926
URL: http://svn.erp5.org?rev=38926&view=rev
Log:
Prevent making root applied rule which may not be needed.
getSimulationQuantity can return None. Before this fix,
since getSimulationQuantity returns None, an empty line
can trigger to generate root applied rule,
Modified:
erp5/trunk/products/ERP5/Document/Delivery.py
Modified: erp5/trunk/products/ERP5/Document/Delivery.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Delivery.py?rev=38926&r1=38925&r2=38926&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Delivery.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Delivery.py [utf8] Wed Oct 6 15:36:40 2010
@@ -338,7 +338,7 @@ class Delivery(XMLObject, Immobilisation
if not m.isSimulated():
#LOG('Delivery.isSimulated m.getQuantity',0,m.getQuantity())
#LOG('Delivery.isSimulated m.getSimulationQuantity',0,m.getSimulationQuantity())
- if m.getQuantity() != 0.0 or m.getSimulationQuantity() != 0:
+ if m.getQuantity() != 0.0 or m.getSimulationQuantity() not in (0, None):
return 0
# else Do we need to create a simulation movement ? XXX probably not
return 1
More information about the Erp5-report
mailing list