[Fix] report_crm: Fix the problem report_crm_fundraising report

bzr revid: sbh@tinyerp.com-20100304071309-x8bbl2zqwfzagt1y
This commit is contained in:
sbh (Open ERP)
2010-03-04 12:43:09 +05:30
parent 1e8b731230
commit 1d02bbc21b
3 changed files with 2 additions and 4 deletions
+1
View File
@@ -53,6 +53,7 @@ class crm_fundraising(osv.osv):
_defaults = {
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'probability':lambda *a:0.0,
}
crm_fundraising()
+1 -3
View File
@@ -7,7 +7,6 @@ class report_crm_fundraising(osv.osv):
_inherit = "report.crm.case"
_columns = {
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'probability': fields.float('Avg. Probability', readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
@@ -25,7 +24,6 @@ class report_crm_fundraising(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
c.stage_id,
count(*) as nbr,
0 as avg_answers,
0.0 as perc_done,
@@ -36,7 +34,7 @@ class report_crm_fundraising(osv.osv):
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id,c.stage_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id
)""")
report_crm_fundraising()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -21,7 +21,6 @@
<field name="state" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
</field>