From ae45dbcd4289f503c41185a65e1917d169b7e6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 30 Jul 2008 15:49:39 +0200 Subject: [PATCH] Set state when creating workflow instance --- trytond/wkf_service/instance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trytond/wkf_service/instance.py b/trytond/wkf_service/instance.py index 8db9b3b199..2ce517e1fb 100644 --- a/trytond/wkf_service/instance.py +++ b/trytond/wkf_service/instance.py @@ -6,8 +6,9 @@ def create(cursor, ident, wkf_id): cursor.execute("SELECT NEXTVAL('wkf_instance_id_seq')") (id_new,) = cursor.fetchone() cursor.execute('INSERT INTO wkf_instance ' \ - '(id, res_type, res_id, uid, workflow) VALUES (%s,%s,%s,%s,%s)', - (id_new, res_type, res_id, user, wkf_id)) + '(id, res_type, res_id, uid, workflow, state) ' \ + 'VALUES (%s, %s, %s, %s, %s, %s)', + (id_new, res_type, res_id, user, wkf_id, 'active')) cursor.execute('SELECT * FROM wkf_activity ' \ 'WHERE flow_start = True and workflow = %s', (wkf_id,)) res = cursor.dictfetchall()