Commit e076ae47 authored by Romain Courteaud's avatar Romain Courteaud

Rename _setDeliveryValue to setDeliveryValue.

Use edit method to store properties on object.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3140 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c020b93b
...@@ -460,17 +460,18 @@ class FakeMovement: ...@@ -460,17 +460,18 @@ class FakeMovement:
""" """
return self.__movement_list return self.__movement_list
def _setDeliveryValue(self, object): def setDeliveryValue(self, object):
""" """
Set Delivery value for each movement Set Delivery value for each movement
And calculate delivery_ratio And calculate delivery_ratio
""" """
for movement in self.__movement_list: for movement in self.__movement_list:
movement._setDeliveryValue(object)
# XXX is delivery_ratio well calculated ? # XXX is delivery_ratio well calculated ?
# movement.getQuantity / # movement.getQuantity /
# (sum object.getRelatedSimulationMovement.getQuantity) # (sum object.getRelatedSimulationMovement.getQuantity)
movement.setDeliveryRatio(movement.getQuantity() / object.getQuantity()) movement.edit(
delivery_value=object,
delivery_ratio=(movement.getQuantity() / object.getQuantity()))
def getPrice(self): def getPrice(self):
""" """
......
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