diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-11-03 11:40:01 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-11-03 11:40:01 +0100 |
| commit | 2e9b33b79322e7e9c99a69ea99f60e73e87d0e4e (patch) | |
| tree | 7efb6d9cb3e5a038ba94f065bc574f7561b33095 /openerp/workflow/instance.py | |
| parent | a6b11a151e687b616035014cf7980f9f485c8e0e (diff) | |
| parent | 80c7209d2e7d80f85e1598e06352ff8d73939d6a (diff) | |
[MERGE] forward port of branch 7.0 up to 80c7209
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 |
