[IMP]report_crm: Fix the view of report
bzr revid: sbh@tinyerp.com-20100303113555-hibktw5szm3unzhn
This commit is contained in:
@@ -6,10 +6,6 @@ class report_crm_claim(osv.osv):
|
||||
_auto = False
|
||||
_inherit = "report.crm.case"
|
||||
_columns = {
|
||||
'probability': fields.float('Avg. Probability', readonly=True),
|
||||
'amount_revenue': fields.float('Est.Revenue', readonly=True),
|
||||
'amount_costs': fields.float('Est.Cost', readonly=True),
|
||||
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
|
||||
@@ -24,14 +20,13 @@ class report_crm_claim(osv.osv):
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.section_id,
|
||||
c.stage_id,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
count(*) as nbr,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
sum(planned_cost) as amount_costs,
|
||||
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
|
||||
avg(probability)::decimal(16,2) as probability,
|
||||
0 as avg_answers,
|
||||
0.0 as perc_done,
|
||||
0.0 as perc_cancel,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
crm_claim c
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Claims">
|
||||
<field name="name" />
|
||||
<field name="name" />
|
||||
<field name="month"/>
|
||||
<field name="nbr" string="#Claim"/>
|
||||
<field name="amount_revenue"/>
|
||||
<field name="probability"/>
|
||||
<field name="amount_revenue_prob"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="nbr" string="#Claim"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -31,8 +31,7 @@ class report_crm_fundraising(osv.osv):
|
||||
0 as avg_answers,
|
||||
0.0 as perc_done,
|
||||
0.0 as perc_cancel,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
sum(planned_cost) as amount_costs,
|
||||
sum(planned_revenue) as amount_revenue,
|
||||
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
|
||||
avg(probability)::decimal(16,2) as probability,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<field name="amount_revenue_prob"/>
|
||||
<field name="delay_close"/>
|
||||
<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"/>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<field name="nbr" string="#Leads"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]"/>
|
||||
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Current" icon="terp-hr" domain="[('state','=','draft')]"/>
|
||||
<filter string="Current" icon="terp-hr" domain="[('state','in',('open','draft'))]"/>
|
||||
<filter string="Won" icon="terp-hr" domain="[('state','=','done')]"/>
|
||||
<filter string="Lost" icon="terp-hr" domain="[('state','=','cancel')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
||||
Reference in New Issue
Block a user