[IMP]report_crm: add the section_id in report_crm_case_user

bzr revid: sbh@tinyerp.com-20100120053915-bqv42zev7qgx352a
This commit is contained in:
sbh (Open ERP)
2010-01-20 11:09:15 +05:30
parent 8458967d42
commit f832890f01
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -37,6 +37,7 @@ class report_crm_case_user(osv.osv):
_columns = {
'name': fields.char('Year',size=64,required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'probability': fields.float('Avg. Probability', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
@@ -54,10 +55,11 @@ class report_crm_case_user(osv.osv):
to_char(c.create_date, 'MM') as month,
c.state,
c.user_id,
c.section_id,
count(*) as nbr
from
crm_case c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id
)""")
report_crm_case_user()
+1
View File
@@ -15,6 +15,7 @@
<field name="name" />
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="nbr"/>
<field name="state"/>
</tree>