Commit 4c573124 authored by Jérome Perrin's avatar Jérome Perrin

Update causality state even if there's no split movements, otherwise the...

Update causality state even if there's no split movements, otherwise the delivery would be left in calculating state. Also activate updateCausalityState after solving.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31044 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2362553e
......@@ -60,6 +60,7 @@ start_date = state_change[\'kwargs\'][\'start_date\']\n
stop_date = state_change[\'kwargs\'][\'stop_date\']\n
\n
if not len(split_movement_list):\n
delivery.updateCausalityState()\n
return\n
\n
tag = delivery.getPath() + \'_split\'\n
......@@ -72,7 +73,8 @@ for movement in split_movement_list:\n
movement, None, \'SplitAndDefer\', start_date=start_date,\n
stop_date=stop_date, activate_kw={\'tag\':tag})\n
\n
delivery.activate().updateCausalityState()\n
delivery.activate(after_tag=tag).updateCausalityState()\n
\n
# Create delivery\n
explanation_uid_list = []\n
object = delivery\n
......@@ -84,7 +86,7 @@ previous_tag = None\n
for delivery_builder in delivery.getBuilderList():\n
this_builder_tag = \'%s_split_%s\' % (delivery.getPath(),\n
delivery_builder.getId())\n
after_tag = [tag]\n
all_tag_list.append(this_builder_tag)\n
if previous_tag:\n
after_tag.append(previous_tag)\n
delivery_builder.activate(activity=\'SQLQueue\',\n
......@@ -145,6 +147,7 @@ for delivery_builder in delivery.getBuilderList():\n
<string>previous_tag</string>
<string>delivery_builder</string>
<string>this_builder_tag</string>
<string>all_tag_list</string>
<string>after_tag</string>
</tuple>
</value>
......
657
\ No newline at end of file
660
\ 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