Commit fd21430e authored by Romain Courteaud's avatar Romain Courteaud

Delivering a confirmed packing list is not possible

parent 9d833d16
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscription")\n hosting_subscription = instance.getSpecialiseValue(portal_type="Hosting Subscription")\n
person_relative_url = hosting_subscription.getDestinationSection()\n person_relative_url = hosting_subscription.getDestinationSection()\n
portal = instance.getPortalObject()\n portal = instance.getPortalObject()\n
isTransitionPossible = portal.portal_workflow.isTransitionPossible\n
\n \n
# Check if instance is allocated\n # Check if instance is allocated\n
partition = instance.getAggregate(portal_type="Computer Partition")\n partition = instance.getAggregate(portal_type="Computer Partition")\n
...@@ -214,6 +215,8 @@ else:\n ...@@ -214,6 +215,8 @@ else:\n
elif (state == stopped):\n elif (state == stopped):\n
delivery.stop()\n delivery.stop()\n
elif (state == destroyed):\n elif (state == destroyed):\n
if isTransitionPossible(delivery, "stop"):\n
delivery.stop()\n
delivery.deliver()\n delivery.deliver()\n
new_delivery = letsclone(cleanup_service_relative_url)\n new_delivery = letsclone(cleanup_service_relative_url)\n
new_delivery.confirm()\n new_delivery.confirm()\n
......
14 15
\ No newline at end of file \ No newline at end of file
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