[MERGE] forward port of branch saas-6 up to b34a62a
This commit is contained in:
@@ -565,7 +565,7 @@
|
||||
<field name="name">Opportunities Tree</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities" decoration-bf="message_needaction==True" decoration-muted="probability == 100" decoration-danger="date_deadline and (date_deadline < current_date)">
|
||||
<tree string="Opportunities" decoration-bf="message_needaction==True" decoration-muted="probability == 100" decoration-danger="date_action and (date_action < current_date)">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
|
||||
@@ -52,7 +52,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
|
||||
|
||||
Reference in New Issue
Block a user