[FIX] Workflow : print of workflow should not be broken if there is no flow_stop
authorJay (Open ERP) <jvo@tinyerp.com>
Tue, 4 May 2010 12:47:13 +0000 (18:17 +0530)
committerJay (Open ERP) <jvo@tinyerp.com>
Tue, 4 May 2010 12:47:13 +0000 (18:17 +0530)
lp bug: https://launchpad.net/bugs/574394 fixed

bzr revid: jvo@tinyerp.com-20100504124713-uyh5gx2bb3l9ega2

bin/addons/base/ir/workflow/print_instance.py

index 7a12e59..4c91e5d 100644 (file)
@@ -82,7 +82,8 @@ def graph_get(cr, graph, wkf_id, nested=False, workitem={}):
     start = cr.fetchone()[0]
     cr.execute("select 'subflow.'||name,id from wkf_activity where flow_stop=True and wkf_id=%s", (wkf_id,))
     stop = cr.fetchall()
-    stop = (stop[0][1], dict(stop))
+    if stop:
+        stop = (stop[0][1], dict(stop))
     return ((start,{}),stop)