[FIX]: crm: Fixed table name crm_opportunity in report query
bzr revid: rpa@tinyerp.com-20100708065047-1qeejljvkp8zqj4x
This commit is contained in:
parent
2a5b07f86c
commit
0d5c37b531
|
@ -51,7 +51,7 @@ class crm_lead_report(osv.osv):
|
|||
for case in self.browse(cr, uid, ids, context):
|
||||
if field_name != 'avg_answers':
|
||||
state = field_name[5:]
|
||||
cr.execute("select count(id) from crm_opportunity where \
|
||||
cr.execute("select count(id) from crm_lead where \
|
||||
section_id =%s and state='%s'"%(case.section_id.id, state))
|
||||
state_cases = cr.fetchone()[0]
|
||||
perc_state = (state_cases / float(case.nbr)) * 100
|
||||
|
|
|
@ -53,7 +53,7 @@ class crm_phonecall_report(osv.osv):
|
|||
for case in self.browse(cr, uid, ids, context):
|
||||
if field_name != 'avg_answers':
|
||||
state = field_name[5:]
|
||||
cr.execute("select count(*) from crm_opportunity where \
|
||||
cr.execute("select count(*) from crm_lead where \
|
||||
section_id =%s and state='%s'"%(case.section_id.id, state))
|
||||
state_cases = cr.fetchone()[0]
|
||||
perc_state = (state_cases / float(case.nbr)) * 100
|
||||
|
|
Loading…
Reference in New Issue