diff --git a/product/ERP5/MovementGroup.py b/product/ERP5/MovementGroup.py index 8f08d5a3ade84ae194043ac127738960e052a324..49b6a6efded66c1efe16318549da7ca19d88da04 100644 --- a/product/ERP5/MovementGroup.py +++ b/product/ERP5/MovementGroup.py @@ -244,7 +244,7 @@ class MovementGroupNode: if movement_price == added_movement_price: new_movement = self._genericCalculation(movement, added_movement=added_movement) - new_movement.setPriceMethod('getAveragePrice') + new_movement.setPriceMethod('getFirstPrice') new_movement.setQuantityMethod("getAddQuantity") return new_movement, None return movement, added_movement @@ -396,6 +396,12 @@ class FakeMovement: """ self.__quantity_method = method + def getFirstPrice(self): + """ + Get price defined on the first movement + """ + return self.getMovementList()[0].getPrice(0) + def getAveragePrice(self): """ Return average price