From 650074e094796ec3214c1fe33dcb938b12ff92be Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Thu, 7 Jul 2005 07:18:55 +0000 Subject: [PATCH] Only modify the line length. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3417 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/DeliveryBuilder.py | 10 +++------- product/ERP5/Document/Movement.py | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/product/ERP5/Document/DeliveryBuilder.py b/product/ERP5/Document/DeliveryBuilder.py index b882e2499f..c21ffe5cfd 100755 --- a/product/ERP5/Document/DeliveryBuilder.py +++ b/product/ERP5/Document/DeliveryBuilder.py @@ -114,20 +114,16 @@ class DeliveryBuilder(XMLObject, Amount, Predicate): in movement_relative_url_list] # Collect root_group = self.collectMovement(movement_list) - # Build delivery_list = self.buildDeliveryList( root_group, delivery_relative_url_list=delivery_relative_url_list) - + # Call script on each delivery built delivery_after_generation_script_id =\ self.getDeliveryAfterGenerationScriptId() - - # Call script on each delivery built if delivery_after_generation_script_id not in ["", None]: for delivery in delivery_list: getattr(delivery, delivery_after_generation_script_id)() - return delivery_list def searchMovementList(self, applied_rule_uid=None): @@ -231,8 +227,8 @@ class DeliveryBuilder(XMLObject, Amount, Predicate): # Deliveries we are trying to update delivery_select_method_id = self.getDeliverySelectMethodId() if delivery_select_method_id not in ["", None]: - to_update_delivery_sql_list = getattr(self, - delivery_select_method_id)(movement_group=movement_group) + to_update_delivery_sql_list = getattr(self, delivery_select_method_id)\ + (movement_group=movement_group) delivery_to_update_list.extend([x.getObject() for x\ in to_update_delivery_sql_list]) diff --git a/product/ERP5/Document/Movement.py b/product/ERP5/Document/Movement.py index b5b4520c68..b8dc47b87b 100755 --- a/product/ERP5/Document/Movement.py +++ b/product/ERP5/Document/Movement.py @@ -381,7 +381,8 @@ class Movement(XMLObject, Amount): # Simulation security.declareProtected(Permissions.View, 'isSimulated') def isSimulated(self): - return len(self.getDeliveryRelatedValueList()) > 0 or len(self.getOrderRelatedValueList()) > 0 + return (len(self.getDeliveryRelatedValueList()) > 0) or\ + (len(self.getOrderRelatedValueList()) > 0) # New Causality API security.declareProtected(Permissions.AccessContentsInformation, 'getOrderQuantity') -- 2.30.9