From 5462e4cc511881bd4d0e08b7a686dbd2a0cd1bf0 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Wed, 8 Mar 2006 15:05:35 +0000 Subject: [PATCH] update_requested is not usefull, we should always update lines if we want to update deliveries git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6042 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/OrderBuilder.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/product/ERP5/Document/OrderBuilder.py b/product/ERP5/Document/OrderBuilder.py index 2fe430b026..40838b4821 100755 --- a/product/ERP5/Document/OrderBuilder.py +++ b/product/ERP5/Document/OrderBuilder.py @@ -351,7 +351,6 @@ class OrderBuilder(XMLObject, Amount, Predicate): def _deliveryLineGroupProcessing(self, delivery, movement_group, collect_order_list, property_dict, - update_requested=0, activate_kw=None,**kw): """ Build delivery line from a list of movement on a delivery @@ -364,19 +363,18 @@ class OrderBuilder(XMLObject, Amount, Predicate): for group in movement_group.getGroupList(): self._deliveryLineGroupProcessing( delivery, group, collect_order_list[1:], property_dict.copy(), - update_requested=update_requested,activate_kw=activate_kw) + activate_kw=activate_kw) else: # Test if we can update an existing line, or if we need to create a new # one delivery_line = None update_existing_line = 0 - if update_requested==1: - for delivery_line_to_update in delivery.contentValues( - filter={'portal_type':self.getDeliveryLinePortalType()}): - if self.testObjectProperties(delivery_line_to_update, property_dict): - delivery_line = delivery_line_to_update - update_existing_line = 1 - break + for delivery_line_to_update in delivery.contentValues( + filter={'portal_type':self.getDeliveryLinePortalType()}): + if self.testObjectProperties(delivery_line_to_update, property_dict): + delivery_line = delivery_line_to_update + update_existing_line = 1 + break if delivery_line == None: # Create delivery line new_delivery_line_id = str(delivery.generateNewId()) -- 2.30.9