diff options
Diffstat (limited to 'openerp/workflow/instance.py')
| -rw-r--r-- | openerp/workflow/instance.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openerp/workflow/instance.py b/openerp/workflow/instance.py index fd15eee6243..61ad8765124 100644 --- a/openerp/workflow/instance.py +++ b/openerp/workflow/instance.py @@ -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 |
