[MERGE] forward port of branch 7.0 up to 80c7209

This commit is contained in:
Christophe Simonis
2015-11-03 11:40:01 +01:00
3 changed files with 11 additions and 2 deletions
+6 -1
View File
@@ -70,7 +70,12 @@ class WorkflowInstance(object):
cr = self.session.cr
cr.execute("select * from wkf_workitem where inst_id=%s", (self.instance['id'],))
stack = []
for work_item_values in cr.dictfetchall():
for i, work_item_values in enumerate(cr.dictfetchall()):
if i > 0:
# test if previous workitem has already processed this one
cr.execute("select id from wkf_workitem where id=%s", (work_item_values['id'],))
if not cr.fetchone():
continue
wi = WorkflowItem(self.session, self.record, work_item_values)
wi.process(signal=signal, force_running=force_running, stack=stack)
# An action is returned