Commit 795202f6 authored by Łukasz Nowak's avatar Łukasz Nowak

Move directly to state.

This code is called during upgrade and shall work without interactions.
parent f92d2c8d
...@@ -84,7 +84,8 @@ def fixSaleOrder(slap_document): ...@@ -84,7 +84,8 @@ def fixSaleOrder(slap_document):
sale_packing_list = sale_packing_list_line_list[0].getParentValue() sale_packing_list = sale_packing_list_line_list[0].getParentValue()
new_sale_order = sale_order.Base_createCloneDocument(batch_mode=1) new_sale_order = sale_order.Base_createCloneDocument(batch_mode=1)
new_sale_order.order() slap_document.getPortalObject().portal_workflow.\
_jumpToStateFor(new_sale_order, 'ordered', 'order_workflow')
applied_rule = sale_order.getCausalityRelatedValue(portal_type='Applied Rule') applied_rule = sale_order.getCausalityRelatedValue(portal_type='Applied Rule')
applied_rule.getParentValue().deleteContent(applied_rule.getId()) applied_rule.getParentValue().deleteContent(applied_rule.getId())
sale_order.getParentValue().deleteContent(sale_order.getId()) sale_order.getParentValue().deleteContent(sale_order.getId())
......
115 116
\ 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