Commit 74260939 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Klaus Wölfel

builder mixin: Auto Planned deliveries if property is checked

parent 6cb2a91b
......@@ -676,7 +676,8 @@ class BuilderMixin(XMLObject, Amount, Predicate):
delivery = delivery_module.newContent(
portal_type=self.getDeliveryPortalType(),
created_by_builder=1)
if self.getPortalObject().portal_workflow.isTransitionPossible(delivery, "auto_plan"):
if self.getDeliveryIsAutoPlanned() \
and self.getPortalObject().portal_workflow.isTransitionPossible(delivery, "auto_plan"):
delivery.autoPlan()
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