Commit 179d8808 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

builder: autoPlan only if possible

parent 6678f0de
...@@ -569,7 +569,8 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -569,7 +569,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
delivery = delivery_module.newContent( delivery = delivery_module.newContent(
portal_type=self.getDeliveryPortalType(), portal_type=self.getDeliveryPortalType(),
created_by_builder=1) created_by_builder=1)
delivery.autoPlan() if self.getPortalObject().portal_workflow.isTransitionPossible(delivery, "auto_plan"):
delivery.autoPlan()
delivery.immediateReindexObject() delivery.immediateReindexObject()
return delivery return delivery
......
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