* In reports, graphs on opportunities shows estimated revenues instead of number of cases
bzr revid: sahibsofia@gmail.com-20081216070746-aduwdhfkkgfunp7p
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
<field name="section_id"/>
|
||||
<field name="category2_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="nbr"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -34,6 +34,7 @@
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="category2_id" select="1"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="nbr" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="delay_close"/>
|
||||
@@ -47,7 +48,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Cases by Section and Category2" type="bar" orientation="horizontal">
|
||||
<field name="category2_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="amount_revenue" operator="+"/>
|
||||
<field name="section_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
@@ -82,6 +83,7 @@
|
||||
<field name="user_id"/>
|
||||
<field name="section_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="nbr"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state"/>
|
||||
@@ -98,6 +100,7 @@
|
||||
<field name="user_id"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="nbr" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="delay_close"/>
|
||||
@@ -111,7 +114,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Cases by Section and Stage" type="bar" orientation="horizontal">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="amount_revenue" operator="+"/>
|
||||
<field name="section_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
|
||||
@@ -38,6 +38,7 @@ class report_crm_case_section_categ2(osv.osv):
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'category2_id':fields.many2one('crm.case.category2', 'Type', readonly=True),
|
||||
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
|
||||
'amount_revenue': fields.float('Est.Revenue', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'delay_close': fields.char('Delay Close', size=20, readonly=True),
|
||||
@@ -56,6 +57,7 @@ class report_crm_case_section_categ2(osv.osv):
|
||||
c.stage_id,
|
||||
c.section_id,
|
||||
count(*) as nbr,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
crm_case c
|
||||
@@ -74,6 +76,7 @@ class report_crm_case_section_stage(osv.osv):
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
|
||||
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
|
||||
'amount_revenue': fields.float('Est.Revenue', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'delay_close': fields.char('Delay Close', size=20, readonly=True),
|
||||
@@ -91,6 +94,7 @@ class report_crm_case_section_stage(osv.osv):
|
||||
c.stage_id,
|
||||
c.section_id,
|
||||
count(*) as nbr,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
crm_case c
|
||||
|
||||
Reference in New Issue
Block a user