[ADD,IMP]: (1) crm_project: Added security files. (2) crm_hr: Added security files. (3) crm: Improved security file. (4) report_crm: Added remaining reports for some objects. Improved security file.

bzr revid: uco@tinyerp.co.in-20100129073552-l3wj2a2md460mho6
This commit is contained in:
uco (OpenERP)
2010-01-29 13:05:52 +05:30
parent edcdff3195
commit 9e4e8f0655
19 changed files with 1708 additions and 20 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ between mails and Open ERP.""",
'crm_helpdesk_menu.xml',
#'crm_report.xml',
'security/crm_security.xml',
#'security/ir.model.access.csv',
'security/ir.model.access.csv',
'process/crm_configuration_process.xml'
],
+9 -8
View File
@@ -6,6 +6,13 @@
"access_crm_case_rule","crm.case.rule","model_crm_case_rule","crm.group_crm_user",1,0,0,0
"access_crm_case_manger","crm.case manager","model_crm_case","crm.group_crm_user",1,1,1,1
"access_crm_case","crm.case","model_crm_case","crm.group_crm_manager",1,1,1,1
"access_crm_claim","crm.claim","model_crm_claim","crm.group_crm_manager",1,1,1,1
"access_crm_fundraising","crm.fundraising","model_crm_fundraising","crm.group_crm_manager",1,1,1,1
"access_crm_helpdesk","crm.helpdesk","model_crm_helpdesk","crm.group_crm_manager",1,1,1,1
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_manager",1,1,1,1
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
"access_crm_opportunity","crm.opportunity","model_crm_opportunity","crm.group_crm_manager",1,1,1,1
"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
"access_crm_case_log","crm.case.log","model_crm_case_log","crm.group_crm_user",1,1,1,1
"access_crm_case_history","crm.case.history","model_crm_case_history","crm.group_crm_user",1,1,1,1
"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
@@ -16,12 +23,6 @@
"access_crm_email_add_cc_manager","crm.email.add.cc","model_crm_email_add_cc","crm.group_crm_manager",1,1,1,1
"access_crm_email_add_cc_user","crm.email.add.cc","model_crm_email_add_cc","crm.group_crm_user",1,0,0,0
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","crm.group_crm_user",1,0,0,0
"access_report_crm_case_section_stage","report.crm.case.section.stage","model_report_crm_case_section_stage","crm.group_crm_manager",1,0,0,0
"access_report_crm_case_section_categ_stage","report.crm.case.section.categ.stage","model_report_crm_case_section_categ_stage","crm.group_crm_manager",1,0,0,0
"access_report_crm_case_section_categ_categ2","report.crm.case.section.categ.categ2","model_report_crm_case_section_categ_categ2","crm.group_crm_manager",1,0,0,
"access_report_crm_case_section_categ2","report.crm.case.section.categ2","model_report_crm_case_section_categ2","crm.group_crm_manager",1,0,0,
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
"access_crm_menu_config_wizard","crm config wizard manager","model_crm_menu_config_wizard","crm.group_crm_manager",1,1,1,1
"access_crm_menu_config_wizard system","crm config wizard manager system","model_crm_menu_config_wizard","base.group_system",1,1,1,1
"access_crm_case_category2_user","crm_case_category2 user","model_crm_case_category2","crm.group_crm_user",1,0,0,0
"access_crm_case_category2_manager","crm_case_category2 manager","model_crm_case_category2","crm.group_crm_manager",1,1,1,1
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
"access_crm_case_resource_type_manager","crm_case_resource_type manager","model_crm_case_resource_type","crm.group_crm_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_crm_case_rule crm.case.rule model_crm_case_rule crm.group_crm_user 1 0 0 0
7 access_crm_case_manger crm.case manager model_crm_case crm.group_crm_user 1 1 1 1
8 access_crm_case crm.case model_crm_case crm.group_crm_manager 1 1 1 1
9 access_crm_claim crm.claim model_crm_claim crm.group_crm_manager 1 1 1 1
10 access_crm_fundraising crm.fundraising model_crm_fundraising crm.group_crm_manager 1 1 1 1
11 access_crm_helpdesk crm.helpdesk model_crm_helpdesk crm.group_crm_manager 1 1 1 1
12 access_crm_meeting crm.meeting model_crm_meeting crm.group_crm_manager 1 1 1 1
13 access_crm_lead crm.lead model_crm_lead crm.group_crm_manager 1 1 1 1
14 access_crm_opportunity crm.opportunity model_crm_opportunity crm.group_crm_manager 1 1 1 1
15 access_crm_phonecall crm.phonecall model_crm_phonecall crm.group_crm_manager 1 1 1 1
16 access_crm_case_log crm.case.log model_crm_case_log crm.group_crm_user 1 1 1 1
17 access_crm_case_history crm.case.history model_crm_case_history crm.group_crm_user 1 1 1 1
18 access_crm_case_section_manager crm.case.section.manager model_crm_case_section crm.group_crm_manager 1 1 1 1
23 access_crm_email_add_cc_manager crm.email.add.cc model_crm_email_add_cc crm.group_crm_manager 1 1 1 1
24 access_crm_email_add_cc_user crm.email.add.cc model_crm_email_add_cc crm.group_crm_user 1 0 0 0
25 access_crm_case_stage crm.case.stage model_crm_case_stage crm.group_crm_user 1 0 0 0
access_report_crm_case_section_stage report.crm.case.section.stage model_report_crm_case_section_stage crm.group_crm_manager 1 0 0 0
access_report_crm_case_section_categ_stage report.crm.case.section.categ.stage model_report_crm_case_section_categ_stage crm.group_crm_manager 1 0 0 0
access_report_crm_case_section_categ_categ2 report.crm.case.section.categ.categ2 model_report_crm_case_section_categ_categ2 crm.group_crm_manager 1 0 0
access_report_crm_case_section_categ2 report.crm.case.section.categ2 model_report_crm_case_section_categ2 crm.group_crm_manager 1 0 0
26 access_crm_case_stage_manager crm.case.stage model_crm_case_stage crm.group_crm_manager 1 1 1 1
27 access_crm_menu_config_wizard access_crm_case_resource_type_user crm config wizard manager crm_case_resource_type user model_crm_menu_config_wizard model_crm_case_resource_type crm.group_crm_manager crm.group_crm_user 1 1 0 1 0 1 0
28 access_crm_menu_config_wizard system access_crm_case_resource_type_manager crm config wizard manager system crm_case_resource_type manager model_crm_menu_config_wizard model_crm_case_resource_type base.group_system crm.group_crm_manager 1 1 1 1
access_crm_case_category2_user crm_case_category2 user model_crm_case_category2 crm.group_crm_user 1 0 0 0
access_crm_case_category2_manager crm_case_category2 manager model_crm_case_category2 crm.group_crm_manager 1 1 1 1
+1
View File
@@ -40,6 +40,7 @@
'crm_hr_menu.xml',
'report_crm_hr_view.xml',
'security/crm_hr_security.xml',
'security/ir.model.access.csv',
'board_crm_hr_statistical_view.xml',
],
'demo_xml': [
+1 -1
View File
@@ -5,7 +5,7 @@
<!--rule for Jobs-->
<record model="ir.rule.group" id="crm_job_rule_group">
<field name="name">crm.meeting.rule</field>
<field name="name">crm.job.rule</field>
<field name="model_id" search="[('model','=','crm.job')]" model="ir.model"/>
<field name="global" eval="True"/>
</record>
@@ -0,0 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_crm_job","crm.job","model_crm_job","crm.group_crm_manager",1,1,1,1
"access_report_crm_job_user","report.crm.job.user","model_report_crm_job_user","crm.group_crm_manager",1,0,0,0
"access_report_crm_job_categ","report.crm.job.categ","model_report_crm_job_categ","crm.group_crm_manager",1,0,0,0
"access_repor_crm_job_section","report.crm.job.section","model_report_crm_job_section","crm.group_crm_manager",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crm_job crm.job model_crm_job crm.group_crm_manager 1 1 1 1
3 access_report_crm_job_user report.crm.job.user model_report_crm_job_user crm.group_crm_manager 1 0 0 0
4 access_report_crm_job_categ report.crm.job.categ model_report_crm_job_categ crm.group_crm_manager 1 0 0 0
5 access_repor_crm_job_section report.crm.job.section model_report_crm_job_section crm.group_crm_manager 1 0 0 0
+2 -1
View File
@@ -40,7 +40,8 @@
'crm_feature_view.xml',
'crm_feature_menu.xml',
'report_crm_project_bug_view.xml',
'security/crm_project_security.xml'
'security/crm_project_security.xml',
'security/ir.model.access.csv',
],
'demo_xml': ['crm_bugs_demo.xml'],
'installable': True,
@@ -0,0 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_crm_project_bug","crm.project.bug","model_crm_project_bug","crm.group_crm_manager",1,1,1,1
"access_crm_project_future","crm.project.future","model_crm_project_future","crm.group_crm_manager",1,1,1,1
"access_report_crm_project_bug_user","report.crm.project.bug.user","model_report_crm_project_bug_user","crm.group_crm_manager",1,0,0,0
"access_report_crm_project_bug_categ","report.crm.project.bug.categ","model_report_crm_project_bug_categ","crm.group_crm_manager",1,0,0,0
"access_repor_crm_project_bug_section","report.crm.project.bug.section","model_report_crm_project_bug_section","crm.group_crm_manager",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crm_project_bug crm.project.bug model_crm_project_bug crm.group_crm_manager 1 1 1 1
3 access_crm_project_future crm.project.future model_crm_project_future crm.group_crm_manager 1 1 1 1
4 access_report_crm_project_bug_user report.crm.project.bug.user model_report_crm_project_bug_user crm.group_crm_manager 1 0 0 0
5 access_report_crm_project_bug_categ report.crm.project.bug.categ model_report_crm_project_bug_categ crm.group_crm_manager 1 0 0 0
6 access_repor_crm_project_bug_section report.crm.project.bug.section model_report_crm_project_bug_section crm.group_crm_manager 1 0 0 0
+99
View File
@@ -191,5 +191,104 @@ class report_crm_case_section_stage(osv.osv):
report_crm_case_section_stage()
class report_crm_case_section_type(osv.osv):
_name = "report.crm.case.section.type"
_description = "Cases by Section and Type"
_auto = False
_columns = {
'name': fields.char('Year',size=64,required=False, 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),
'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),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
}
_order = 'section_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_type")
cr.execute("""
create view report_crm_case_section_type as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
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.user_id, c.section_id, c.state)""")
report_crm_case_section_type()
class report_crm_case_section_categ_stage(osv.osv):
_name = "report.crm.case.section.categ.stage"
_description = "Cases by Section, Category and Stage"
_auto = False
_columns = {
'name': fields.char('Year',size=64,required=False, 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),
'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),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
}
_order = 'section_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_categ_stage")
cr.execute("""
create view report_crm_case_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
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.user_id, c.state, c.section_id)""")
report_crm_case_section_categ_stage()
class report_crm_case_section_categ_type(osv.osv):
_name = "report.crm.case.section.categ.type"
_description = "Cases by Section, Category and Type"
_auto = False
_columns = {
'name': fields.char('Year',size=64,required=False, 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),
'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),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
}
_order = 'section_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_categ_type")
cr.execute("""
create view report_crm_case_section_categ_type as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
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.user_id, c.state, c.section_id)""")
report_crm_case_section_categ_type()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+106
View File
@@ -128,4 +128,110 @@ class report_crm_claim_section(osv.osv):
)""")
report_crm_claim_section()
class report_crm_claim_section_type(osv.osv):
_name = "report.crm.claim.section.type"
_inherit = "report.crm.case.section.type"
_description = "Claims by section and type"
_auto = False
_columns = {
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_claim_section_type")
cr.execute("""
create view report_crm_claim_section_type as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.type_id,
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_claim c
where c.type_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.type_id, c.section_id)""")
report_crm_claim_section_type()
class report_crm_claim_section_categ_stage(osv.osv):
_name = "report.crm.claim.section.categ.stage"
_inherit = "report.crm.case.section.categ.stage"
_description = "Claims by Section, Category and Stage"
_auto = False
_columns = {
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, categ_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_claim_section_categ_stage")
cr.execute("""
create view report_crm_claim_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_claim c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_claim_section_categ_stage()
class report_crm_claim_section_categ_type(osv.osv):
_name = "report.crm.claim.section.categ.type"
_inherit = "report.crm.case.section.categ.type"
_description = "Claims by Section, Category and Type"
_auto = False
_columns = {
'categ_id':fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'categ_id, type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_claim_section_categ_type")
cr.execute("""
create view report_crm_claim_section_categ_type as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.type_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_claim c
where c.categ_id is not null AND c.type_id is not null
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_claim_section_categ_type()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+237 -1
View File
@@ -186,6 +186,242 @@
<field name="view_id" ref="view_report_crm_claim_section_graph"/>
<field name="search_view_id" ref="view_report_crm_claim_section_filter"/>
</record>
<menuitem action="action_report_crm_claim_section_tree" id="menu_crm_claim_section_tree" parent="menu_crm_claim_tree"/>
<menuitem action="action_report_crm_claim_section_tree" id="menu_crm_claim_section_tree" parent="menu_crm_claim_tree"/>
#
# Claims by section and type
#
<record model="ir.ui.view" id="view_crm_claim_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
<field name="model">report.crm.claim.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_form">
<field name="name">CRM Report - Sections and Type(Form)</field>
<field name="model">report.crm.claim.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_graph">
<field name="name">CRM Report - Sections and Type(Graph)</field>
<field name="model">report.crm.claim.section.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases by Section and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_claim_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="model">report.crm.claim.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="type_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_claim_section_categ_tree">
<field name="res_model">report.crm.claim.section.type</field>
<field name="name">Claims by section and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_claim_section_categ_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_claim_section_categ_graph"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_claim_section_categ_tree"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_tree"/>
</record>
<menuitem action="action_report_crm_claim_section_categ_tree" id="menu_crm_claim_section_categ_tree" parent="menu_crm_claim_tree"/>
#
# Claims by section, category and stage
#
<record model="ir.ui.view" id="view_crm_claim_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="model">report.crm.claim.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="model">report.crm.claim.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_stage_graph">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.claim.section.categ.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Claims by Section, Category and Stage" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_claim_section_categ_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.claim.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_claim_section_categ_stage_tree">
<field name="res_model">report.crm.claim.section.categ.stage</field>
<field name="name">Claims by section, category and stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_claim_section_categ_stage_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_stage_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_claim_section_categ_stage_graph"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_stage_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_stage_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_claim_section_categ_stage_tree"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_stage_tree"/>
</record>
<menuitem action="action_report_crm_claim_section_categ_stage_tree" id="menu_crm_claim_section_categ_stage_tree" parent="menu_crm_claim_tree"/>
#
# Claims by section, category and type
#
<record model="ir.ui.view" id="view_crm_claim_section_categ_type_tree">
<field name="name">CRM Report - Section, Category and Type(Tree)</field>
<field name="model">report.crm.claim.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_type_form">
<field name="name">CRM Report - Section, Category and Type(Form)</field>
<field name="model">report.crm.claim.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_claim_section_categ_type_graph">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.claim.section.categ.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Claims by Section, Category and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_claim_section_categ_type_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.claim.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id" select="1"/>
<field name="type_id" select="1"/>
<field name="stage_id" select="1"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_claim_section_categ_type_tree">
<field name="res_model">report.crm.claim.section.categ.type</field>
<field name="name">Claims by section, category and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_claim_section_categ_type_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_type_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_claim_section_categ_type_graph"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_type_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_claim_section_categ_type_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_claim_section_categ_type_tree"/>
<field name="act_window_id" ref="action_report_crm_claim_section_categ_type_tree"/>
</record>
<menuitem action="action_report_crm_claim_section_categ_type_tree" id="menu_crm_claim_section_categ_type_tree" parent="menu_crm_claim_tree"/>
</data>
</openerp>
+106
View File
@@ -128,4 +128,110 @@ class report_crm_fundraising_section(osv.osv):
)""")
report_crm_fundraising_section()
class report_crm_fundraising_section_type(osv.osv):
_name = "report.crm.fundraising.section.type"
_inherit = "report.crm.case.section.type"
_description = "Fundraising by section and type"
_auto = False
_columns = {
'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_fundraising_section_type")
cr.execute("""
create view report_crm_fundraising_section_type as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.type_id,
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_fundraising c
where c.type_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.type_id, c.section_id)""")
report_crm_fundraising_section_type()
class report_crm_fundraising_section_categ_stage(osv.osv):
_name = "report.crm.fundraising.section.categ.stage"
_inherit = "report.crm.case.section.categ.stage"
_description = "Fundraising by Section, Category and Stage"
_auto = False
_columns = {
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, categ_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_fundraising_section_categ_stage")
cr.execute("""
create view report_crm_fundraising_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_fundraising c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_fundraising_section_categ_stage()
class report_crm_fundraising_section_categ_type(osv.osv):
_name = "report.crm.fundraising.section.categ.type"
_inherit = "report.crm.case.section.categ.type"
_description = "Fundraising by Section, Category and Type"
_auto = False
_columns = {
'categ_id':fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'categ_id, type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_fundraising_section_categ_type")
cr.execute("""
create view report_crm_fundraising_section_categ_type as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.type_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_fundraising c
where c.categ_id is not null AND c.type_id is not null
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_fundraising_section_categ_type()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -71,7 +71,7 @@
<menuitem name="Fundraising" id="menu_crm_fundraising_tree" parent="crm.next_id_52"/>
<menuitem action="action_report_crm_fundraising_user_tree" id="menu_crm_fundraising_user_tree" parent="menu_crm_fundraising_tree"/>
<!-- # fundraising by section and category of case -->
<!-- # Fundraising by section and category of case -->
<record id="view_crm_fundraising_categ_tree" model="ir.ui.view">
<field name="name">report.crm.fundraising.categ.tree</field>
@@ -138,7 +138,7 @@
</record>
<menuitem action="action_report_crm_fundraising_categ_tree" id="menu_crm_fundraising_categ_tree" parent="menu_crm_fundraising_tree"/>
<!-- fundraising by Section -->
<!-- Fundraising by Section -->
<record id="view_report_crm_fundraising_section_tree" model="ir.ui.view">
<field name="name">report.crm.fundraising.section.tree</field>
@@ -187,5 +187,240 @@
<field name="search_view_id" ref="view_report_crm_fundraising_section_filter"/>
</record>
<menuitem action="action_report_crm_fundraising_section_tree" id="menu_crm_fundraising_section_tree" parent="menu_crm_fundraising_tree"/>
#
# Fundraising by section and type
#
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
<field name="model">report.crm.fundraising.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_form">
<field name="name">CRM Report - Sections and Type(Form)</field>
<field name="model">report.crm.fundraising.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_graph">
<field name="name">CRM Report - Sections and Type(Graph)</field>
<field name="model">report.crm.fundraising.section.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Fundraising by Section and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_fundraising_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="model">report.crm.fundraising.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="type_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_fundraising_section_categ_tree">
<field name="res_model">report.crm.fundraising.section.type</field>
<field name="name">Fundraising by section and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_fundraising_section_categ_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_graph"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_tree"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_tree"/>
</record>
<menuitem action="action_report_crm_fundraising_section_categ_tree" id="menu_crm_fundraising_section_categ_tree" parent="menu_crm_fundraising_tree"/>
#
# Fundraising by section, category and stage
#
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="model">report.crm.fundraising.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="model">report.crm.fundraising.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_stage_graph">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.fundraising.section.categ.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Fundraising by Section, Category and Stage" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_fundraising_section_categ_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.fundraising.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_fundraising_section_categ_stage_tree">
<field name="res_model">report.crm.fundraising.section.categ.stage</field>
<field name="name">Fundraising by section, category and stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_fundraising_section_categ_stage_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_stage_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_stage_graph"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_stage_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_stage_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_stage_tree"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_stage_tree"/>
</record>
<menuitem action="action_report_crm_fundraising_section_categ_stage_tree" id="menu_crm_fundraising_section_categ_stage_tree" parent="menu_crm_fundraising_tree"/>
#
# Fundraising by section, category and type
#
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_type_tree">
<field name="name">CRM Report - Section, Category and Type(Tree)</field>
<field name="model">report.crm.fundraising.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_type_form">
<field name="name">CRM Report - Section, Category and Type(Form)</field>
<field name="model">report.crm.fundraising.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_fundraising_section_categ_type_graph">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.fundraising.section.categ.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Fundraising by Section, Category and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_fundraising_section_categ_type_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.fundraising.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id" select="1"/>
<field name="type_id" select="1"/>
<field name="stage_id" select="1"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_fundraising_section_categ_type_tree">
<field name="res_model">report.crm.fundraising.section.categ.type</field>
<field name="name">Fundraising by section, category and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_fundraising_section_categ_type_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_type_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_type_graph"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_type_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_fundraising_section_categ_type_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_fundraising_section_categ_type_tree"/>
<field name="act_window_id" ref="action_report_crm_fundraising_section_categ_type_tree"/>
</record>
<menuitem action="action_report_crm_fundraising_section_categ_type_tree" id="menu_crm_fundraising_section_categ_type_tree" parent="menu_crm_fundraising_tree"/>
</data>
</openerp>
+106
View File
@@ -164,4 +164,110 @@ class report_crm_lead_section_stage(osv.osv):
report_crm_lead_section_stage()
class report_crm_lead_section_type(osv.osv):
_name = "report.crm.lead.section.type"
_inherit = "report.crm.case.section.type"
_description = "Leads by section and type"
_auto = False
_columns = {
'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_lead_section_type")
cr.execute("""
create view report_crm_lead_section_type as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.type_id,
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_lead c
where c.type_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.type_id, c.section_id)""")
report_crm_lead_section_type()
class report_crm_lead_section_categ_stage(osv.osv):
_name = "report.crm.lead.section.categ.stage"
_inherit = "report.crm.case.section.categ.stage"
_description = "Leads by Section, Category and Stage"
_auto = False
_columns = {
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, categ_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_lead_section_categ_stage")
cr.execute("""
create view report_crm_lead_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_lead c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_lead_section_categ_stage()
class report_crm_lead_section_categ_type(osv.osv):
_name = "report.crm.lead.section.categ.type"
_inherit = "report.crm.case.section.categ.type"
_description = "Leads by Section, Category and Type"
_auto = False
_columns = {
'categ_id':fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'categ_id, type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_lead_section_categ_type")
cr.execute("""
create view report_crm_lead_section_categ_type as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.type_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_lead c
where c.categ_id is not null AND c.type_id is not null
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_lead_section_categ_type()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+235
View File
@@ -246,5 +246,240 @@
<field name="view_id" ref="view_crm_lead_section_stage_tree"/>
<field name="search_view_id" ref="view_crm_lead_section_stage_filter"/>
</record>
#
# Leads by section and type
#
<record model="ir.ui.view" id="view_crm_lead_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
<field name="model">report.crm.lead.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_form">
<field name="name">CRM Report - Sections and Type(Form)</field>
<field name="model">report.crm.lead.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_graph">
<field name="name">CRM Report - Sections and Type(Graph)</field>
<field name="model">report.crm.lead.section.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads by Section and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_lead_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="model">report.crm.lead.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="type_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_lead_section_categ_tree">
<field name="res_model">report.crm.lead.section.type</field>
<field name="name">Leads by section and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_lead_section_categ_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_lead_section_categ_graph"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_lead_section_categ_tree"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_tree"/>
</record>
<menuitem action="action_report_crm_lead_section_categ_tree" id="menu_crm_lead_section_categ_tree" parent="menu_crm_leads_tree"/>
#
# Leads by section, category and stage
#
<record model="ir.ui.view" id="view_crm_lead_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="model">report.crm.lead.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="model">report.crm.lead.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_stage_graph">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.lead.section.categ.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads by Section, Category and Stage" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_lead_section_categ_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.lead.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_lead_section_categ_stage_tree">
<field name="res_model">report.crm.lead.section.categ.stage</field>
<field name="name">Leads by section, category and stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_lead_section_categ_stage_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_stage_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_lead_section_categ_stage_graph"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_stage_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_stage_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_lead_section_categ_stage_tree"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_stage_tree"/>
</record>
<menuitem action="action_report_crm_lead_section_categ_stage_tree" id="menu_crm_lead_section_categ_stage_tree" parent="menu_crm_leads_tree"/>
#
# Leads by section, category and type
#
<record model="ir.ui.view" id="view_crm_lead_section_categ_type_tree">
<field name="name">CRM Report - Section, Category and Type(Tree)</field>
<field name="model">report.crm.lead.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_type_form">
<field name="name">CRM Report - Section, Category and Type(Form)</field>
<field name="model">report.crm.lead.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_lead_section_categ_type_graph">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.lead.section.categ.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Leads by Section, Category and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_lead_section_categ_type_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.lead.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id" select="1"/>
<field name="type_id" select="1"/>
<field name="stage_id" select="1"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_lead_section_categ_type_tree">
<field name="res_model">report.crm.lead.section.categ.type</field>
<field name="name">Leads by section, category and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_lead_section_categ_type_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_type_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_lead_section_categ_type_graph"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_type_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_lead_section_categ_type_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_lead_section_categ_type_tree"/>
<field name="act_window_id" ref="action_report_crm_lead_section_categ_type_tree"/>
</record>
<menuitem action="action_report_crm_lead_section_categ_type_tree" id="menu_crm_lead_section_categ_type_tree" parent="menu_crm_leads_tree"/>
</data>
</openerp>
+105
View File
@@ -128,4 +128,109 @@ class report_crm_opportunity_section(osv.osv):
)""")
report_crm_opportunity_section()
class report_crm_opportunity_section_type(osv.osv):
_name = "report.crm.opportunity.section.type"
_inherit = "report.crm.case.section.type"
_description = "Opportunity by section and type"
_auto = False
_columns = {
'type_id': fields.many2one('crm.case.resource.type', 'Opportunity Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_opportunity_section_type")
cr.execute("""
create view report_crm_opportunity_section_type as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.type_id,
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_opportunity c
where c.type_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.type_id, c.section_id)""")
report_crm_opportunity_section_type()
class report_crm_opportunity_section_categ_stage(osv.osv):
_name = "report.crm.opportunity.section.categ.stage"
_inherit = "report.crm.case.section.categ.stage"
_description = "Opportunity by Section, Category and Stage"
_auto = False
_columns = {
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, categ_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_opportunity_section_categ_stage")
cr.execute("""
create view report_crm_opportunity_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_opportunity c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_opportunity_section_categ_stage()
class report_crm_opportunity_section_categ_type(osv.osv):
_name = "report.crm.opportunity.section.categ.type"
_inherit = "report.crm.case.section.categ.type"
_description = "Opportunity by Section, Category and Type"
_auto = False
_columns = {
'categ_id':fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'type_id': fields.many2one('crm.case.resource.type', 'Opportunity Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'categ_id, type_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_opportunity_section_categ_type")
cr.execute("""
create view report_crm_opportunity_section_categ_type as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.type_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_opportunity c
where c.categ_id is not null AND c.type_id is not null
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:
@@ -187,5 +187,240 @@
<field name="search_view_id" ref="view_report_crm_opportunity_section_filter"/>
</record>
<menuitem action="action_report_crm_opportunity_section_tree" id="menu_crm_opportunity_section_tree" parent="menu_crm_opportunity_tree"/>
#
# Opportunity by section and type
#
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
<field name="model">report.crm.opportunity.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_form">
<field name="name">CRM Report - Sections and Type(Form)</field>
<field name="model">report.crm.opportunity.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="type_id"/>
<field name="stage_id"/>
<field name="amount_revenue"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_graph">
<field name="name">CRM Report - Sections and Type(Graph)</field>
<field name="model">report.crm.opportunity.section.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Section and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="amount_revenue" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_opportunity_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="model">report.crm.opportunity.section.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="type_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_opportunity_section_categ_tree">
<field name="res_model">report.crm.opportunity.section.type</field>
<field name="name">Opportunity by section and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_opportunity_section_categ_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_graph"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_tree"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_tree"/>
</record>
<menuitem action="action_report_crm_opportunity_section_categ_tree" id="menu_crm_opportunity_section_categ_tree" parent="menu_crm_opportunity_tree"/>
#
# Opportunity by section, category and stage
#
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="model">report.crm.opportunity.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="model">report.crm.opportunity.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_stage_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_stage_graph">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.opportunity.section.categ.stage</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Section, Category and Stage" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_opportunity_section_categ_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.opportunity.section.categ.stage</field>
<field name="inherit_id" ref="view_crm_case_section_categ_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id"/>
<field name="stage_id"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_opportunity_section_categ_stage_tree">
<field name="res_model">report.crm.opportunity.section.categ.stage</field>
<field name="name">Opportunity by section, category and stage</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_opportunity_section_categ_stage_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_stage_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_stage_graph"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_stage_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_stage_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_stage_tree"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_stage_tree"/>
</record>
<menuitem action="action_report_crm_opportunity_section_categ_stage_tree" id="menu_crm_opportunity_section_categ_stage_tree" parent="menu_crm_opportunity_tree"/>
#
# opportunitys by section, category and type
#
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_type_tree">
<field name="name">CRM Report - Section, Category and Type(Tree)</field>
<field name="model">report.crm.opportunity.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_tree"/>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_type_form">
<field name="name">CRM Report - Section, Category and Type(Form)</field>
<field name="model">report.crm.opportunity.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="categ_id"/>
<field name="type_id"/>
<field name="stage_id"/>
<field name="delay_close"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_crm_opportunity_section_categ_type_graph">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.opportunity.section.categ.type</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Section, Category and Type" type="bar" orientation="horizontal">
<field name="type_id"/>
<field name="nbr" operator="+"/>
<field name="section_id" group="True"/>
</graph>
</field>
</record>
<record id="view_crm_opportunity_section_categ_type_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.opportunity.section.categ.type</field>
<field name="inherit_id" ref="view_crm_case_section_categ_type_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<field name="section_id" position="after">
<field name="categ_id" select="1"/>
<field name="type_id" select="1"/>
<field name="stage_id" select="1"/>
</field>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_opportunity_section_categ_type_tree">
<field name="res_model">report.crm.opportunity.section.categ.type</field>
<field name="name">Opportunity by section, category and type</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_crm_opportunity_section_categ_type_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_type_graph">
<field name="sequence" eval="1"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_type_graph"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_type_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_opportunity_section_categ_type_tree">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_opportunity_section_categ_type_tree"/>
<field name="act_window_id" ref="action_report_crm_opportunity_section_categ_type_tree"/>
</record>
<menuitem action="action_report_crm_opportunity_section_categ_type_tree" id="menu_crm_opportunity_section_categ_type_tree" parent="menu_crm_opportunity_tree"/>
</data>
</openerp>
+2 -2
View File
@@ -36,7 +36,7 @@ report_crm_phonecall_user()
class report_crm_phonecall_categ(osv.osv):
_name = "report.crm.phonecall.categ"
_description = "Phone Calls by section and category"
_description = "Phone calls by section and category"
_auto = False
_inherit = "report.crm.case.categ"
_columns = {
@@ -71,7 +71,7 @@ report_crm_phonecall_categ()
class report_crm_phonecall_section(osv.osv):
_name = "report.crm.phonecall.section"
_description = "Phonecalls by Section"
_description = "Phone calls by Section"
_auto = False
_inherit = "report.crm.case.section"
+183 -3
View File
@@ -3,8 +3,8 @@
<data>
<!--
Cases by user and section
-->
Cases by user and section
-->
<record id="view_crm_case_user_tree" model="ir.ui.view">
<field name="name">report.crm.case.user.tree</field>
@@ -268,6 +268,186 @@
<field name="view_mode">tree</field>
<field name="search_view_id" ref="view_crm_case_section_stage_filter"/>
</record>
#
# Cases by section and type of case
#
<record model="ir.ui.view" id="view_crm_case_section_categ_tree">
<field name="name">CRM Report - Sections and Type(Tree)</field>
<field name="model">report.crm.case.section.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="nbr"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_crm_case_section_categ_form">
<field name="name">CRM Report - Sections and Type(Form)</field>
<field name="model">report.crm.case.section.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases by Section and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</form>
</field>
</record>
<record id="view_crm_case_section_categ_filter" model="ir.ui.view">
<field name="name">CRM Report - Sections and Type(Select)</field>
<field name="model">report.crm.case.section.type</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Cases by Section and Type">
<group col="10" colspan="4">
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]" help="Cases by Section and Type for this year"/>
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" help="Cases by Section and Type for this month"/>
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree">
<field name="res_model">report.crm.case.section.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="search_view_id" ref="view_crm_case_section_categ_filter"/>
</record>
#
# Cases by section, category and stage
#
<record model="ir.ui.view" id="view_crm_case_section_categ_stage_tree">
<field name="name">CRM Report - Section, Category and Stage(Tree)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section, Category and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="nbr"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_crm_case_section_categ_stage_form">
<field name="name">CRM Report - Section, Category and Stage(Form)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases by Section, Category and Stage">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</form>
</field>
</record>
<record id="view_crm_case_section_categ_stage_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Stage(Select)</field>
<field name="model">report.crm.case.section.categ.stage</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Cases by Section, Category and Stage">
<group col='8' colspan='4'>
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]" help="Cases by Section, Category and Stage for this year"/>
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" help="Cases by Section, Category and Stage for this month"/>
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree">
<field name="res_model">report.crm.case.section.categ.stage</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="search_view_id" ref="view_crm_case_section_categ_stage_filter"/>
</record>
#
# Cases by section, category and type
#
<record model="ir.ui.view" id="view_crm_case_section_categ_type_tree">
<field name="name">CRM Report - Section, Category and Type(Tree)</field>
<field name="model">report.crm.case.section.categ.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Cases by Section, Category and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="nbr"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_crm_case_section_categ_type_form">
<field name="name">CRM Report - Section, Category and Type(Form)</field>
<field name="model">report.crm.case.section.categ.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cases by Section, Category and Type">
<field name="name"/>
<field name="month"/>
<field name="user_id"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</form>
</field>
</record>
<record id="view_crm_case_section_categ_type_filter" model="ir.ui.view">
<field name="name">CRM Report - Section, Category and Type(Select)</field>
<field name="model">report.crm.case.section.categ.type</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Cases by User">
<group col='12' colspan='4'>
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]" help="Cases by User for this year"/>
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" help="Cases by User for this month"/>
<separator orientation="vertical"/>
<field name="section_id" select="1" widget="selection"/>
<field name="nbr" select="1"/>
<field name="state" select="1"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_crm_case_section_categ_type_tree">
<field name="res_model">report.crm.case.section.categ.type</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="search_view_id" ref="view_crm_case_section_categ_type_filter"/>
</record>
<!-- Closed & Open CRM Case view for Random Activities dashboard -->
@@ -318,6 +498,6 @@
<field name="view_id" ref="board_view_crm_case_open_dashboard_tree"/>
<field name="domain">[('state','=','open')]</field>
</record>
</data>
</openerp>
+32 -1
View File
@@ -3,4 +3,35 @@ access_report_crm_case_user,report.crm.case.user,model_report_crm_case_user,crm.
access_report_crm_case_categ,report.crm.case.categ,model_report_crm_case_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_case_section,report.crm.case.section,model_report_crm_case_section,crm.group_crm_manager,1,0,0,0
access_report_crm_case_service_dashboard,report.crm.case.service.dashboard,model_report_crm_case_service_dashboard,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_stage,report.crm.case.section.stage,model_report_crm_case_section_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_categ_stage,report.crm.case.section.categ.stage,model_report_crm_case_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_categ_type,report.crm.case.section.categ.type,model_report_crm_case_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_case_section_type,report.crm.case.section.type,model_report_crm_case_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_claim_user,report.crm.claim.user,model_report_crm_claim_user,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_categ,report.crm.claim.categ,model_report_crm_claim_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_claim_section,report.crm.claim.section,model_report_crm_claim_section,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_section_categ_stage,report.crm.claim.section.categ.stage,model_report_crm_claim_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_section_categ_type,report.crm.claim.section.categ.type,model_report_crm_claim_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_claim_section_type,report.crm.claim.section.type,model_report_crm_claim_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_fundraising_user,report.crm.fundraising.user,model_report_crm_fundraising_user,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_categ,report.crm.fundraising.categ,model_report_crm_fundraising_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_fundraising_section,report.crm.fundraising.section,model_report_crm_fundraising_section,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_section_categ_stage,report.crm.fundraising.section.categ.stage,model_report_crm_fundraising_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_section_categ_type,report.crm.fundraising.section.categ.type,model_report_crm_fundraising_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_fundraising_section_type,report.crm.fundraising.section.type,model_report_crm_fundraising_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_lead_user,report.crm.lead.user,model_report_crm_lead_user,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_categ,report.crm.lead.categ,model_report_crm_lead_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_lead_section,report.crm.lead.section,model_report_crm_lead_section,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_stage,report.crm.lead.section.stage,model_report_crm_lead_section_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_categ_stage,report.crm.lead.section.categ.stage,model_report_crm_lead_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_categ_type,report.crm.lead.section.categ.type,model_report_crm_lead_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_lead_section_type,report.crm.lead.section.type,model_report_crm_lead_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_opportunity_user,report.crm.opportunity.user,model_report_crm_opportunity_user,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_categ,report.crm.opportunity.categ,model_report_crm_opportunity_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_opportunity_section,report.crm.opportunity.section,model_report_crm_opportunity_section,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_section_categ_stage,report.crm.opportunity.section.categ.stage,model_report_crm_opportunity_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_section_categ_type,report.crm.opportunity.section.categ.type,model_report_crm_opportunity_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_opportunity_section_type,report.crm.opportunity.section.type,model_report_crm_opportunity_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_phonecall_user,report.crm.phonecall.user,model_report_crm_phonecall_user,crm.group_crm_manager,1,0,0,0
access_report_crm_phonecall_categ,report.crm.phonecall.categ,model_report_crm_phonecall_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_phonecall_section,report.crm.phonecall.section,model_report_crm_phonecall_section,crm.group_crm_manager,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
3 access_report_crm_case_categ report.crm.case.categ model_report_crm_case_categ crm.group_crm_manager 1 0 0 0
4 access_repor_crm_case_section report.crm.case.section model_report_crm_case_section crm.group_crm_manager 1 0 0 0
5 access_report_crm_case_service_dashboard report.crm.case.service.dashboard model_report_crm_case_service_dashboard crm.group_crm_manager 1 0 0 0
6 access_report_crm_case_section_stage report.crm.case.section.stage model_report_crm_case_section_stage crm.group_crm_manager 1 0 0 0
7 access_report_crm_case_section_categ_stage report.crm.case.section.categ.stage model_report_crm_case_section_categ_stage crm.group_crm_manager 1 0 0 0
8 access_report_crm_case_section_categ_type report.crm.case.section.categ.type model_report_crm_case_section_categ_type crm.group_crm_manager 1 0 0
9 access_report_crm_case_section_type report.crm.case.section.type model_report_crm_case_section_type crm.group_crm_manager 1 0 0
10 access_report_crm_claim_user report.crm.claim.user model_report_crm_claim_user crm.group_crm_manager 1 0 0 0
11 access_report_crm_claim_categ report.crm.claim.categ model_report_crm_claim_categ crm.group_crm_manager 1 0 0 0
12 access_repor_crm_claim_section report.crm.claim.section model_report_crm_claim_section crm.group_crm_manager 1 0 0 0
13 access_report_crm_claim_section_categ_stage report.crm.claim.section.categ.stage model_report_crm_claim_section_categ_stage crm.group_crm_manager 1 0 0 0
14 access_report_crm_claim_section_categ_type report.crm.claim.section.categ.type model_report_crm_claim_section_categ_type crm.group_crm_manager 1 0 0
15 access_report_crm_claim_section_type report.crm.claim.section.type model_report_crm_claim_section_type crm.group_crm_manager 1 0 0
16 access_report_crm_fundraising_user report.crm.fundraising.user model_report_crm_fundraising_user crm.group_crm_manager 1 0 0 0
17 access_report_crm_fundraising_categ report.crm.fundraising.categ model_report_crm_fundraising_categ crm.group_crm_manager 1 0 0 0
18 access_repor_crm_fundraising_section report.crm.fundraising.section model_report_crm_fundraising_section crm.group_crm_manager 1 0 0 0
19 access_report_crm_fundraising_section_categ_stage report.crm.fundraising.section.categ.stage model_report_crm_fundraising_section_categ_stage crm.group_crm_manager 1 0 0 0
20 access_report_crm_fundraising_section_categ_type report.crm.fundraising.section.categ.type model_report_crm_fundraising_section_categ_type crm.group_crm_manager 1 0 0
21 access_report_crm_fundraising_section_type report.crm.fundraising.section.type model_report_crm_fundraising_section_type crm.group_crm_manager 1 0 0
22 access_report_crm_lead_user report.crm.lead.user model_report_crm_lead_user crm.group_crm_manager 1 0 0 0
23 access_report_crm_lead_categ report.crm.lead.categ model_report_crm_lead_categ crm.group_crm_manager 1 0 0 0
24 access_repor_crm_lead_section report.crm.lead.section model_report_crm_lead_section crm.group_crm_manager 1 0 0 0
25 access_report_crm_lead_section_stage report.crm.lead.section.stage model_report_crm_lead_section_stage crm.group_crm_manager 1 0 0 0
26 access_report_crm_lead_section_categ_stage report.crm.lead.section.categ.stage model_report_crm_lead_section_categ_stage crm.group_crm_manager 1 0 0 0
27 access_report_crm_lead_section_categ_type report.crm.lead.section.categ.type model_report_crm_lead_section_categ_type crm.group_crm_manager 1 0 0
28 access_report_crm_lead_section_type report.crm.lead.section.type model_report_crm_lead_section_type crm.group_crm_manager 1 0 0
29 access_report_crm_opportunity_user report.crm.opportunity.user model_report_crm_opportunity_user crm.group_crm_manager 1 0 0 0
30 access_report_crm_opportunity_categ report.crm.opportunity.categ model_report_crm_opportunity_categ crm.group_crm_manager 1 0 0 0
31 access_repor_crm_opportunity_section report.crm.opportunity.section model_report_crm_opportunity_section crm.group_crm_manager 1 0 0 0
32 access_report_crm_opportunity_section_categ_stage report.crm.opportunity.section.categ.stage model_report_crm_opportunity_section_categ_stage crm.group_crm_manager 1 0 0 0
33 access_report_crm_opportunity_section_categ_type report.crm.opportunity.section.categ.type model_report_crm_opportunity_section_categ_type crm.group_crm_manager 1 0 0
34 access_report_crm_opportunity_section_type report.crm.opportunity.section.type model_report_crm_opportunity_section_type crm.group_crm_manager 1 0 0
35 access_report_crm_phonecall_user report.crm.phonecall.user model_report_crm_phonecall_user crm.group_crm_manager 1 0 0 0
36 access_report_crm_phonecall_categ report.crm.phonecall.categ model_report_crm_phonecall_categ crm.group_crm_manager 1 0 0 0
37 access_repor_crm_phonecall_section report.crm.phonecall.section model_report_crm_phonecall_section crm.group_crm_manager 1 0 0 0