[IMP] removes the hardcoded Day, Month, Year value in crm.phonecall.report model and updates the corresponding view (addon crm)
bzr revid: ged@openerp.com-20140129095655-xn031hst4yw79kna
This commit is contained in:
parent
a05306c70d
commit
1edb992857
|
@ -40,20 +40,12 @@ class crm_phonecall_report(osv.osv):
|
|||
_auto = False
|
||||
|
||||
_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),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
|
||||
'month':fields.selection([('01', 'January'), ('02', 'February'), \
|
||||
('03', 'March'), ('04', 'April'),\
|
||||
('05', 'May'), ('06', 'June'), \
|
||||
('07', 'July'), ('08', 'August'),\
|
||||
('09', 'September'), ('10', 'October'),\
|
||||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'create_date': fields.datetime('Create Date', readonly=True, select=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'duration': fields.float('Duration', digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
|
@ -77,9 +69,6 @@ class crm_phonecall_report(osv.osv):
|
|||
create or replace view crm_phonecall_report as (
|
||||
select
|
||||
id,
|
||||
to_char(c.date, 'YYYY') as name,
|
||||
to_char(c.date, 'MM') as month,
|
||||
to_char(c.date, 'YYYY-MM-DD') as day,
|
||||
to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
|
||||
to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<field name="user_id" type="row"/>
|
||||
<!-- <field name="state" type="col"/> -->
|
||||
<field name="nbr" type="measure"/>
|
||||
<field name="duration" type="measure"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -52,9 +53,9 @@
|
|||
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
|
||||
<filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Day" icon="terp-go-today" domain="[]" context="{'group_by':'day'}" help="Date of call"/>
|
||||
<filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'month'}" help="Month of call"/>
|
||||
<filter string="Year" icon="terp-go-year" domain="[]" context="{'group_by':'name'}" help="Year of call"/>
|
||||
<filter string="Creation Date (day)" icon="terp-go-today" domain="[]" context="{'group_by':'create_date:day'}" help="Date of call"/>
|
||||
<filter string="Creation Date (month)" icon="terp-go-month" domain="[]" context="{'group_by':'create_date:month'}" help="Month of call"/>
|
||||
<filter string="Creation Date (year)" icon="terp-go-year" domain="[]" context="{'group_by':'create_date:name'}" help="Year of call"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue