bzr revid: hmo@tinyerp.com-20100129115945-616nmkl331e66m0i
This commit is contained in:
Harry (Open ERP) 2010-01-29 17:29:45 +05:30
commit f187eb9d71
33 changed files with 1786 additions and 118 deletions

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'
],

View File

@ -26,8 +26,9 @@
<field name="arch" type="xml">
<form string="Helpdesk Support">
<group colspan="4" col="7">
<field colspan="2" name="name" select="1"/>
<field colspan="1" name="section_id" widget="selection"/>
<field colspan="4" name="name" select="1"/>
<field name="section_id" widget="selection"/>
<newline/>
<field name="date" select="1"/>
<field name="date_deadline" select="2"/>
<field name="priority"/>
@ -127,7 +128,7 @@
<field name="partner_id" string="Partner"/>
<field name="planned_revenue"/>
<field name="probability"/>
<field name="date" string="Deadline"/>
<field name="date_deadline"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-close"/>

View File

@ -46,7 +46,7 @@ class crm_lead(osv.osv):
_order = "id desc"
_inherit = 'crm.case'
_columns = {
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Lead Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
'partner_name': fields.char("Employee's Name", size=64),
'partner_name2': fields.char('Employee Email', size=64),

View File

@ -2,42 +2,7 @@
<openerp>
<data noupdate="1">
<record model="crm.case.categ" id="categ_lead1">
<field name="name">Existing Customer</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead2">
<field name="name">Self Generated</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead3">
<field name="name">Employee</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead4">
<field name="name">Partner</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead6">
<field name="name">Website</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead7">
<field name="name">Word of mouth</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_lead8">
<field name="name">Other</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<!-- CASE STATUS(stage_id) -->
<record model="crm.case.stage" id="stage_lead1">
<field name="name">New</field>

View File

@ -16,7 +16,7 @@
<field eval="&quot;Michel Lafont&quot;" name="partner_name2"/>
<field eval="&quot;(726) 782-0636&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_lead6"/>
<field name="categ_id" ref="crm.categ_oppor6"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field eval="&quot;The Oil Company&quot;" name="partner_name"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
@ -31,7 +31,7 @@
<field eval="&quot;Luc Latour&quot;" name="partner_name2"/>
<field eval="&quot;(392) 895-7917&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_lead2"/>
<field name="categ_id" ref="crm.categ_oppor2"/>
<field name="stage_id" ref="crm.stage_lead2"/>
<field eval="&quot;Le Club SARL&quot;" name="partner_name"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
@ -46,7 +46,7 @@
<field eval="&quot;Mike Gardner&quot;" name="partner_name2"/>
<field eval="&quot;(820) 167-3208&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_lead4"/>
<field name="categ_id" ref="crm.categ_oppor4"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="&quot;TheKompany&quot;" name="partner_name"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
@ -61,7 +61,7 @@
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;(077) 582-4035&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_lead1"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field eval="&quot;The Gas Company&quot;" name="partner_name"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
@ -76,7 +76,7 @@
<field eval="&quot;Sam Stone&quot;" name="partner_name2"/>
<field eval="&quot;(333) 715-1450&quot;" name="partner_mobile"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_lead6"/>
<field name="categ_id" ref="crm.categ_oppor6"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="&quot;Stonage IT&quot;" name="partner_name"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
@ -93,7 +93,7 @@
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;Benoit Mortier&quot;" name="partner_name2"/>
<field eval="&quot;(468) 017-2684&quot;" name="partner_mobile"/>
<field name="categ_id" ref="crm.categ_lead8"/>
<field name="categ_id" ref="crm.categ_oppor8"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="&quot;Opensides SPRL&quot;" name="partner_name"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
@ -109,7 +109,7 @@
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="&quot;Will Smith&quot;" name="partner_name2"/>
<field eval="&quot;(463) 014-1208&quot;" name="partner_mobile"/>
<field name="categ_id" ref="crm.categ_lead4"/>
<field name="categ_id" ref="crm.categ_oppor4"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="&quot;Gardner Group&quot;" name="partner_name"/>
<field eval="&quot;(282) 603-7489&quot;" name="partner_phone"/>

View File

@ -6,7 +6,7 @@
<!-- MENU -->
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all">
<field name="name">All Leads</field>
<field name="name">Leads</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>

View File

@ -2,20 +2,8 @@
<openerp>
<data>
# ------------------------------------------------------
# Leads Categories
# ------------------------------------------------------
<record id="crm_lead_categ_action" model="ir.actions.act_window">
<field name="name">Lead Categories</field>
<field name="res_model">crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
<field name="context">{'object_id':'crm.lead'}</field>
</record>
<menuitem action="crm_lead_categ_action" id="menu_crm_case_lead-act" parent="crm.menu_crm_case_categ"/>
# ------------------------------------------------------
# Stage
# ------------------------------------------------------
@ -41,8 +29,9 @@
<group colspan="4" col="7">
<field name="name" select="1" string="Lead Subject"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" select="2"/>
<newline/>
<field name="opportunity_id" string="Opportunity Case"/>
<button string="Convert to Opportunity" name="%(wizard_crm_lead_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
<field name="stage_id" select="1" nolabel="1"/>
@ -50,10 +39,10 @@
</group>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Lead Source"/>
<field name="type_id" string="Campaign Type" select="1"/>
</group>
<group colspan="2" col="4">
<field name="opportunity_id" string="Opportunity Case"/>
<button string="Convert to Opportunity" name="%(wizard_crm_lead_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<newline/>
<field name="date"/>
<field name="date_deadline"/>
<field name="user_id" select="2"/>
</group>
<notebook colspan="4">
<page string="Leads">

View File

@ -22,6 +22,12 @@
from osv import fields, osv
import crm
class crm_opportunity(osv.osv):
_name = 'crm.opportunity'
crm_opportunity()
class crm_phonecall(osv.osv):
_name = 'crm.phonecall'
crm_phonecall()
class crm_meeting(osv.osv):
_name = 'crm.meeting'
_description = "Meeting Cases"
@ -36,6 +42,8 @@ class crm_meeting(osv.osv):
help='Category related to the section.Subdivide the CRM cases \
independently or section-wise.'),
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', 'event_id', 'attendee_id', 'Attendees'),
'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
'opportunity_id':fields.many2one ('crm.opportunity', 'Opportunity'),
}
crm_meeting()

View File

@ -46,7 +46,8 @@
icon="gtk-save-as" type="action" context="{'model' : 'crm.meeting'}"
attrs="{'readonly': [('rrule_type','!=','custom')]}"
/>
</group>
</group>
</group>
<notebook colspan="4">
<page string="Description">

View File

@ -2,9 +2,27 @@
<openerp>
<data noupdate="1">
<!-- <menuitem id="menu_presale" name="Sales" parent="crm.menu_crm" sequence="4"/>-->
<act_window
id="act_crm_opportunity_crm_meeting_new"
name="Meeting Cases"
res_model="crm.meeting"
src_model="crm.opportunity"
view_mode="calendar,graph"
context="{'default_partner_id': active_id, 'default_duration': 4.0}"
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_phonecall_new"
name="Phone calls"
res_model="crm.phonecall"
src_model="crm.opportunity"
view_mode="calendar,tree,form"
context="{'default_partner_id': active_id, 'default_duration': 1.0}"
view_type="form"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">All Opportunities</field>
<field name="name">Opportunities</field>
<field name="res_model">crm.opportunity</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>

View File

@ -51,12 +51,10 @@
<field name="stage_id" select="1" nolabel="1"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="date" string="Deadline"/>
<group colspan="2">
<field name="phonecall_id" select="1"/>
</group>
<button string="Schedule a Phone Call"
name="%(wizard_crm_opportunity_reschedule_phone_call)d" icon="gtk-redo" type="action" attrs="{'invisible':[('phonecall_id','!=',False)]}" />
<field name="date" />
<field name="date_deadline"/>
<button string="Schedule a Phone Call"
name="%(wizard_crm_opportunity_reschedule_phone_call)d" icon="gtk-redo" type="action" />
</group>
<notebook colspan="4">
<page string="Description">
@ -153,7 +151,7 @@
<field name="partner_id" string="Partner"/>
<field name="planned_revenue"/>
<field name="probability"/>
<field name="date" string="Deadline"/>
<field name="date_deadline"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>

View File

@ -82,19 +82,19 @@
<field name="name" string="Subject"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" string="Assigned to" select="2"/>
<button string="Convert to Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
<newline/>
<field name="date" string="Planned Date"/>
<field name="duration"/>
<group colspan="2">
<field name="opportunity_id" on_change="onchange_case_id(case_id, name, partner_id)"
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
</group>
<button string="Schedule a Meeting"
name="%(wizard_crm_phonecall_meeting_set)d" icon="gtk-redo" type="action" />
<newline/>
<field name="date" string="Planned Date"/>
<field name="duration"/>
<field name="opportunity_id" on_change="onchange_case_id(case_id, name, partner_id)"
context="{'default_name':name,'default_section_id':section_id,'default_user_id':user_id,'default_duration':duration,
'default_partner_id':partner_id,'default_partner_address_id':partner_address_id,'default_partner_phone':partner_phone,
'default_partner_mobile':partner_mobile,'default_categ_id':categ_id}"/>
<button string="Convert to Opportunity" name="%(wizard_crm_phonecall_opportunity_set)d" icon="gtk-index" type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
</group>
<notebook colspan="4">
<page string="General">

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

View File

@ -94,13 +94,11 @@ class opportunity2phonecall(wizard.interface):
'section_id' : form['section_id'],
'partner_id': opportunity.partner_id.id,
'partner_address_id':opportunity.partner_address_id.id,
'description':opportunity.description
'description':opportunity.description,
'opportunity_id':opportunity.id
}, context=context)
vals = {}
if not opportunity.phonecall_id:
vals.update({'phonecall_id' : new_case})
opportunity_case_obj.write(cr, uid, [opportunity.id], vals)
opportunity_case_obj.case_cancel(cr, uid, [opportunity.id])
phonecall_case_obj.case_open(cr, uid, [new_case])
value = {
@ -142,6 +140,7 @@ class opportunity2meeting(wizard.interface):
'section_id' : opportunity.section_id and opportunity.section_id.id or False,
'date_deadline': opportunity.date_deadline,
'description':opportunity.description,
'opportunity_id':opportunity.id
})
new_meeting = meeting_case_obj.browse(cr, uid, new_meeting_id)
vals = {}

View File

@ -104,14 +104,14 @@ class phonecall2opportunity(wizard.interface):
'probability': data['form']['probability'],
'partner_id': data['form']['partner_id'],
'section_id':phonecall.section_id.id,
'description':phonecall.description,
'description':phonecall.description,
'phonecall_id': phonecall.id
})
new_opportunity = opportunity_case_obj.browse(cr, uid, new_opportunity_id)
vals = {
'partner_id': data['form']['partner_id'],
}
if not phonecall.opportunity_id:
vals.update({'opportunity_id' : new_opportunity.id})
'partner_id': data['form']['partner_id'],
'opportunity_id' : new_opportunity_id,
}
phonecall_case_obj.write(cr, uid, [phonecall.id], vals)
phonecall_case_obj.case_cancel(cr, uid, [phonecall.id])
opportunity_case_obj.case_open(cr, uid, [new_opportunity_id])
@ -202,6 +202,7 @@ class phonecall2meeting(wizard.interface):
'section_id' : phonecall.section_id and phonecall.section_id.id or False,
'duration': phonecall.duration,
'description':phonecall.description,
'phonecall_id':phonecall.id
})
new_meeting = meeting_case_obj.browse(cr, uid, new_meeting_id)
vals = {}

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': [

View File

@ -5,7 +5,7 @@
######################## JOB OPPORTUNITIES (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_categ0_act_job">
<field name="name">All Jobs Requests</field>
<field name="name">Jobs Requests</field>
<field name="res_model">crm.job</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_job"/>

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>

View File

@ -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

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,

View File

@ -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

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:

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:

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>

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:

View File

@ -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>

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:

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>

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:

View File

@ -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>

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"

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>

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