diff --git a/product/ERP5/Document/DeliveryCell.py b/product/ERP5/Document/DeliveryCell.py index ec351ab0d24794e92c7ce99dff5eb3c1df36725c..dc355f460164e779482e93d222d3c7f569d4626c 100755 --- a/product/ERP5/Document/DeliveryCell.py +++ b/product/ERP5/Document/DeliveryCell.py @@ -275,7 +275,10 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getRemainingQuantity() + if self.aq_parent.aq_parent.getPortalType() in ('Purchase Packing List', ) : + quantity += object_item.getQuantity() + else : + quantity += object_item.getRemainingQuantity() self.setTargetQuantity(quantity) diff --git a/product/ERP5/Document/DeliveryLine.py b/product/ERP5/Document/DeliveryLine.py index a6eb3017aa6fcd18193b172a986e58d3322343c9..d8a8d41362fd4bfdbbc40c18c5421858dc59dc08 100755 --- a/product/ERP5/Document/DeliveryLine.py +++ b/product/ERP5/Document/DeliveryLine.py @@ -386,7 +386,10 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getRemainingQuantity() + if self.aq_parent.getPortalType() in ('Purchase Packing List', ) : + quantity += object_item.getQuantity() + else : + quantity += object_item.getRemainingQuantity() self.setTargetQuantity(quantity) diff --git a/product/ERP5/Document/InventoryCell.py b/product/ERP5/Document/InventoryCell.py index 3e79bbaf0477b3c406a26e0178fe7439387a9297..9b34ef7178c6a570d98007f2420a5966da0c16a1 100755 --- a/product/ERP5/Document/InventoryCell.py +++ b/product/ERP5/Document/InventoryCell.py @@ -198,7 +198,7 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getRemainingQuantity() + quantity += object_item.getQuantity() self.setInventory(quantity) @@ -272,7 +272,7 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getQuantity() + quantity += object_item.getRemainingQuantity() self.setConsumptionQuantity(quantity) diff --git a/product/ERP5/Document/InventoryLine.py b/product/ERP5/Document/InventoryLine.py index aa5c8a9beeb84d08e11cbfd5e2eb798567e339a1..7b15b93eaf8fafc9b01908c6500ff52c8795c938 100755 --- a/product/ERP5/Document/InventoryLine.py +++ b/product/ERP5/Document/InventoryLine.py @@ -238,7 +238,7 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getRemainingQuantity() + quantity += object_item.getQuantity() self.setInventory(quantity) @@ -304,7 +304,7 @@ Une ligne tarifaire.""" quantity = 0 for object_item in item_object_list : - quantity += object_item.getQuantity() + quantity += object_item.getRemainingQuantity() self.setConsumptionQuantity(quantity)