[MERGE] forward port of branch saas-6 up to b34a62a

This commit is contained in:
Christophe Simonis
2015-11-03 13:06:42 +01:00
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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 &lt; current_date)">
<tree string="Opportunities" decoration-bf="message_needaction==True" decoration-muted="probability == 100" decoration-danger="date_action and (date_action &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="name" string="Opportunity"/>
+6 -1
View File
@@ -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