Commit cd9d92b4 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

builder: include order delay and effective date

parent 75cd1ac0
...@@ -303,6 +303,8 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -303,6 +303,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
time_second_ratio = resource_value.getQuantityUnitDefinitionRatio(portal.portal_categories.quantity_unit.time.second) time_second_ratio = resource_value.getQuantityUnitDefinitionRatio(portal.portal_categories.quantity_unit.time.second)
min_delay = supply.getMinDelay() min_delay = supply.getMinDelay()
max_delay = supply.getMaxDelay() max_delay = supply.getMaxDelay()
min_order_delay = supply.getMinOrderDelay()
max_order_delay = supply.getMaxOrderDelay()
min_order = supply.getMinOrderQuantity() min_order = supply.getMinOrderQuantity()
max_order = supply.getMaxOrderQuantity() max_order = supply.getMaxOrderQuantity()
...@@ -310,6 +312,8 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -310,6 +312,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# XXX To be cleaned # XXX To be cleaned
min_delay_second = 0 min_delay_second = 0
max_delay_second = 0 max_delay_second = 0
min_order_delay_second = 0
max_order_delay_second = 0
min_order_in_default_quantity_unit = 0 min_order_in_default_quantity_unit = 0
max_order_in_default_quantity_unit = float('inf') max_order_in_default_quantity_unit = float('inf')
...@@ -322,6 +326,10 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -322,6 +326,10 @@ class BuilderMixin(XMLObject, Amount, Predicate):
min_delay_second = min_delay * time_second_conversion_ratio min_delay_second = min_delay * time_second_conversion_ratio
if max_delay: if max_delay:
max_delay_second = max_delay * time_second_conversion_ratio max_delay_second = max_delay * time_second_conversion_ratio
if min_order_delay:
min_order_delay_second = min_order_delay * time_second_conversion_ratio
if max_delay:
max_order_delay_second = max_order_delay * time_second_conversion_ratio
if order_quantity_unit_value is not None: if order_quantity_unit_value is not None:
order_quantity_unit_relative_url = order_quantity_unit_value.getCategoryRelativeUrl() order_quantity_unit_relative_url = order_quantity_unit_value.getCategoryRelativeUrl()
......
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