[Erp5-report] r28833 - /erp5/trunk/products/ERP5/Document/SimulationMovement.py

nobody at svn.erp5.org nobody at svn.erp5.org
Sun Sep 6 16:04:55 CEST 2009


Author: yo
Date: Sun Sep  6 16:04:55 2009
New Revision: 28833

URL: http://svn.erp5.org?rev=28833&view=rev
Log:
Add missing self. Stop calling needlessly iterkeys.

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

Modified: erp5/trunk/products/ERP5/Document/SimulationMovement.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/SimulationMovement.py?rev=28833&r1=28832&r2=28833&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/SimulationMovement.py [utf8] Sun Sep  6 16:04:55 2009
@@ -216,7 +216,7 @@
     """
       Returns 1 if this needs to be ordered
     """
-    if isOrderable():
+    if self.isOrderable():
       return len(self.getCategoryMembership('order')) is 0
     else:
       return 0
@@ -227,7 +227,7 @@
     """
       Returns 1 if this needs to be accounted
     """
-    if isDeliverable():
+    if self.isDeliverable():
       return len(self.getCategoryMembership('delivery')) is 0
     else:
       return 0
@@ -263,7 +263,7 @@
     for rule in portal_rules.searchRuleList(self, sort_on='version',
         sort_order='descending'):
       ref = rule.getReference()
-      if ref and ref not in applicable_rule_dict.iterkeys():
+      if ref and ref not in applicable_rule_dict:
         applicable_rule_dict[ref] = rule
 
     for applied_rule in self.objectValues():
@@ -275,7 +275,7 @@
 
     for rule in applicable_rule_dict.itervalues():
       rule_type = rule.getPortalType()
-      if rule_type not in applied_rule_dict.iterkeys():
+      if rule_type not in applied_rule_dict:
         applied_rule = rule.constructNewAppliedRule(self, **kw)
         applied_rule_dict[rule_type] = applied_rule
 




More information about the Erp5-report mailing list