[FIX]: crm: Fixed table name crm_opportunity in report query

bzr revid: rpa@tinyerp.com-20100708065047-1qeejljvkp8zqj4x
This commit is contained in:
rpa (Open ERP) 2010-07-08 12:20:47 +05:30
parent 2a5b07f86c
commit 0d5c37b531
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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