'partner_mobile': fields.char('Mobile', size=32),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.applicant')]"),
- 'duration': fields.float('Duration'),
- 'case_id': fields.many2one('crm.case', 'Related Case'),
+ 'duration': fields.float('Duration'),
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
_name = "report.crm.case.service.dashboard"
_description = "Report of Closed and Open CRM Cases within past 15 days"
_auto = False
- _columns = {
- 'date': fields.datetime('Date', readonly=True),
+ _columns = {
'date_deadline': fields.datetime('Deadline', readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'user_id': fields.many2one('res.users', 'Responsible', readonly=True),
def init(self, cr):
cr.execute("""create or replace view report_crm_case_service_dashboard as (
select
- cse.id as id, cse.date as date, cse.date_deadline as date_deadline,
+ cse.id as id, cse.date_deadline as date_deadline,
cse.name as name, cse.user_id as user_id,
cse.state as state,
cse.create_date as create_date
_inherit = "report.crm.case.user"
_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': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
'delay_close': fields.char('Delay to close', size=20, readonly=True),
}
c.user_id,
c.section_id,
count(*) as nbr,
- 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
_inherit = "report.crm.case.categ"
_columns = {
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
- 'amount_revenue': fields.float('Est.Revenue', readonly=True),
- 'amount_costs': fields.float('Est.Cost', readonly=True),
+ 'amount_revenue': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
'probability': fields.float('Avg. Probability', readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
c.state,
c.section_id,
count(*) as nbr,
- 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
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.type_id, c.state, c.stage_id, c.section_id)""")
report_crm_opportunity_section_categ_type()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
_description = "Phone calls by user and section"
_auto = False
_inherit = "report.crm.case.user"
- _columns = {
- '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),
+ _columns = {
'delay_close': fields.char('Delay to close', size=20, readonly=True),
}
def init(self, cr):
c.state,
c.user_id,
c.section_id,
- count(*) as nbr,
- sum(planned_revenue) as amount_revenue,
- sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
- avg(probability)::decimal(16,2) as probability,
+ count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_phonecall c
_auto = False
_inherit = "report.crm.case.categ"
_columns = {
- 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
- 'amount_revenue': fields.float('Est.Revenue', readonly=True),
- 'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
- 'probability': fields.float('Avg. Probability', readonly=True),
+ 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
c.categ_id,
c.state,
c.section_id,
- count(*) as nbr,
- sum(planned_revenue) as amount_revenue,
- sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
- avg(probability)::decimal(16,2) as probability,
+ count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_phonecall c
)""")
report_crm_phonecall_section()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: