Commit f84d358f authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify and follow Vifib idea.

Do not build locally, as global builders are used anyway.
Plan and update causality state immediately.
parent 3fca2075
...@@ -69,24 +69,12 @@ if invoice.getStartDate() is None:\n ...@@ -69,24 +69,12 @@ if invoice.getStartDate() is None:\n
invoice.setStartDate(DateTime())\n invoice.setStartDate(DateTime())\n
\n \n
# initialize accounting_workflow to planned state\n # initialize accounting_workflow to planned state\n
plan_tag = \'%s_plan\' % invoice.getPath()\n
if invoice.getSimulationState() == \'draft\':\n if invoice.getSimulationState() == \'draft\':\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n invoice.plan()\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=plan_tag).plan(comment=translateString(\'Initialised by Delivery Builder.\'))\n
else:\n
# call builder just same as after script of \'plan\' transition\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
tag=plan_tag).Delivery_expandAndBuild()\n
\n \n
# First set the invoice in the building state on the causality workflow\n # Update causality workflow\n
invoice.startBuilding()\n invoice.startBuilding()\n
\n invoice.updateCausalityState()\n
# Then an activity should put the causality state in diverged or solved\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\')),\n
after_tag=plan_tag).updateCausalityState()\n
\n \n
# update specialise from movements\n # update specialise from movements\n
specialise_list = invoice.getSpecialiseList()\n specialise_list = invoice.getSpecialiseList()\n
......
389 390
\ 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