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

builder: Hackish immediate reindex of order to work for parallel build

parent 6e6f19f5
...@@ -558,10 +558,12 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -558,10 +558,12 @@ class BuilderMixin(XMLObject, Amount, Predicate):
Create a new delivery in case where a builder may not update Create a new delivery in case where a builder may not update
an existing one. an existing one.
""" """
return delivery_module.newContent( delivery = delivery_module.newContent(
portal_type=self.getDeliveryPortalType(), portal_type=self.getDeliveryPortalType(),
created_by_builder=1, created_by_builder=1)
activate_kw=activate_kw) delivery.autoPlan()
delivery.immediateReindexObject()
return delivery
def _processDeliveryGroup(self, delivery_module, movement_group_node, def _processDeliveryGroup(self, delivery_module, movement_group_node,
collect_order_list, movement_group_node_list=None, collect_order_list, movement_group_node_list=None,
...@@ -625,6 +627,7 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -625,6 +627,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
if property_dict: if property_dict:
property_dict.setdefault('edit_order', ('stop_date', 'start_date')) property_dict.setdefault('edit_order', ('stop_date', 'start_date'))
delivery.edit(**property_dict) delivery.edit(**property_dict)
delivery.immediateReindexObject()
# Then, create delivery line # Then, create delivery line
for grouped_node in movement_group_node.getGroupList(): for grouped_node in movement_group_node.getGroupList():
......
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