Commit f44504e8 authored by Romain Courteaud's avatar Romain Courteaud

Modified FakeMovement, in order to implement correctly option variation in

Delivery(Order)Builder.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3488 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4a466c0f
...@@ -508,6 +508,28 @@ class FakeMovement: ...@@ -508,6 +508,28 @@ class FakeMovement:
for movement in self.__movement_list: for movement in self.__movement_list:
movement.edit(delivery_value=object) movement.edit(delivery_value=object)
def getDeliveryValue(self):
"""
Only use to test if all movement are not linked (if user did not
configure DeliveryBuilder well...).
Be careful.
"""
result = None
for movement in self.__movement_list:
mvt_delivery = movement.getDeliveryValue()
if mvt_delivery is not None:
result = mvt_delivery
break
return result
def getRelativeUrl(self):
"""
Only use to return a short description of one movement
(if user did not configure DeliveryBuilder well...).
Be careful.
"""
return self.__movement_list[0].getRelativeUrl()
def setDeliveryRatio(self, delivery_ratio): def setDeliveryRatio(self, delivery_ratio):
""" """
Calculate delivery_ratio Calculate delivery_ratio
...@@ -600,19 +622,21 @@ class FakeMovement: ...@@ -600,19 +622,21 @@ class FakeMovement:
path_list.append(movement.getPath()) path_list.append(movement.getPath())
return path_list return path_list
def getVariationBaseCategoryList(self): def getVariationBaseCategoryList(self, omit_option_base_category=0):
""" """
Return variation base category list Return variation base category list
Which must be shared by all movement Which must be shared by all movement
""" """
return self.__movement_list[0].getVariationBaseCategoryList() return self.__movement_list[0].getVariationBaseCategoryList(
omit_option_base_category=omit_option_base_category)
def getVariationCategoryList(self): def getVariationCategoryList(self, omit_option_base_category=0):
""" """
Return variation base category list Return variation base category list
Which must be shared by all movement Which must be shared by all movement
""" """
return self.__movement_list[0].getVariationCategoryList() return self.__movement_list[0].getVariationCategoryList(
omit_option_base_category=omit_option_base_category)
def edit(self, **kw): def edit(self, **kw):
""" """
......
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