Commit 52a8f52f authored by Łukasz Nowak's avatar Łukasz Nowak

- bulletproof: try really hard to deliver any packing list and do it in safe...

- bulletproof: try really hard to deliver any packing list and do it in safe way, by checking if transition is really possible

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43987 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6720b5ee
......@@ -75,8 +75,12 @@ for sale_packing_list_line in sale_packing_list.contentValues(\n
default_aggregate_uid=software_instance.getUid(),\n
simulation_state=NegatedQuery(Query(simulation_state="delivered")),\n
):\n
if sale_packing_list_line.getSimulationState() != \'delivered\':\n
sale_packing_list_line.getParentValue().deliver()\n
if sale_packing_list.getPortalObject().portal_workflow.isTransitionPossible(sale_packing_list, \'start\'):\n
sale_packing_list.start()\n
if sale_packing_list.getPortalObject().portal_workflow.isTransitionPossible(sale_packing_list, \'stop\'):\n
sale_packing_list.stop()\n
if sale_packing_list.getPortalObject().portal_workflow.isTransitionPossible(sale_packing_list, \'deliver\'):\n
sale_packing_list.deliver()\n
\n
# Remove unused open sale order line\n
subscription_item = sale_packing_list_line.getAggregateValue(portal_type="Hosting Subscription")\n
......
352
\ No newline at end of file
356
\ 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