[Erp5-report] r35984 jerome - /erp5/trunk/products/ERP5/Document/DeliveryLine.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jun 4 11:23:03 CEST 2010


Author: jerome
Date: Fri Jun  4 11:22:58 2010
New Revision: 35984

URL: http://svn.erp5.org?rev=35984&view=rev
Log:
simplify method

Modified:
    erp5/trunk/products/ERP5/Document/DeliveryLine.py

Modified: erp5/trunk/products/ERP5/Document/DeliveryLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryLine.py?rev=35984&r1=35983&r2=35984&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryLine.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryLine.py [utf8] Fri Jun  4 11:22:58 2010
@@ -374,17 +374,9 @@
 
     security.declareProtected(Permissions.View, 'isDivergent')
     def isDivergent(self):
-      """
-        Returns 1 if the target is not met according to the current information
-        After and edit, the isOutOfTarget will be checked. If it is 1,
-        a message is emitted
-
-        emit targetUnreachable !
-      """
-      if self.getDivergenceList() == []:
-        return 0
-      else:
-        return 1
+      """ Returns true if the delivery line is divergent
+      """
+      return not self.getDivergenceList()
 
     security.declareProtected(Permissions.View, 'getDivergenceList')
     def getDivergenceList(self):




More information about the Erp5-report mailing list