Commit 7ec5475d authored by Gabriel Monnerat's avatar Gabriel Monnerat

is needed check the state of sale packing list, because when is requested stop...

is needed check the state of sale packing list, because when is requested stop one Slave Instance, the Software Instance is still running, then computer_partition.started() is called and will raise a exception because the Software Instance is already started.
parent 34f1ccc1
......@@ -50,9 +50,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list_line = context.SoftwareInstance_getInstanceHostingPackingListLine(state_change)\n
packing_list = packing_list_line.getParentValue()\n
packing_list.start()\n
<value> <string>from Products.ERP5Type.Log import log\n
packing_list_line = context.SoftwareInstance_getInstanceHostingPackingListLine(state_change)\n
if packing_list_line.getSimulationState() != "started":\n
packing_list_line.getParentValue().start()\n
else:\n
software_instance = state_change["object"].getRelativeUrl()\n
log("The Sale Packing List %s for Software Instance %s is already started" % \\\n
(packing_list_line.getRelativeUrl(), software_instance))\n
</string> </value>
</item>
<item>
......
275
\ No newline at end of file
276
\ 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