Commit e720f3f2 authored by Thierry's avatar Thierry

modification in setItemIdList : in some cases we should use getQuantity (on...

modification in setItemIdList : in some cases we should use getQuantity (on item) to compute movement quantity and in some other cases we should use getRemainingQuantity


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@91 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a18e1164
...@@ -275,7 +275,10 @@ Une ligne tarifaire.""" ...@@ -275,7 +275,10 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : 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) self.setTargetQuantity(quantity)
......
...@@ -386,7 +386,10 @@ Une ligne tarifaire.""" ...@@ -386,7 +386,10 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : 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) self.setTargetQuantity(quantity)
......
...@@ -198,7 +198,7 @@ Une ligne tarifaire.""" ...@@ -198,7 +198,7 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : for object_item in item_object_list :
quantity += object_item.getRemainingQuantity() quantity += object_item.getQuantity()
self.setInventory(quantity) self.setInventory(quantity)
...@@ -272,7 +272,7 @@ Une ligne tarifaire.""" ...@@ -272,7 +272,7 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : for object_item in item_object_list :
quantity += object_item.getQuantity() quantity += object_item.getRemainingQuantity()
self.setConsumptionQuantity(quantity) self.setConsumptionQuantity(quantity)
......
...@@ -238,7 +238,7 @@ Une ligne tarifaire.""" ...@@ -238,7 +238,7 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : for object_item in item_object_list :
quantity += object_item.getRemainingQuantity() quantity += object_item.getQuantity()
self.setInventory(quantity) self.setInventory(quantity)
...@@ -304,7 +304,7 @@ Une ligne tarifaire.""" ...@@ -304,7 +304,7 @@ Une ligne tarifaire."""
quantity = 0 quantity = 0
for object_item in item_object_list : for object_item in item_object_list :
quantity += object_item.getQuantity() quantity += object_item.getRemainingQuantity()
self.setConsumptionQuantity(quantity) self.setConsumptionQuantity(quantity)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment