[ADD] mass_mailing: added base for mass mailing analysis. Currently void analysis.
- added marketing menu in report, menu added by marketing - adde dskeleton for mass mailing report + skeleton for graph veiws bzr revid: tde@openerp.com-20140328102601-pzrtkuble3icdj1g
This commit is contained in:
parent
900705ca5b
commit
5fa2297aff
|
@ -6,5 +6,9 @@
|
|||
<menuitem name="Marketing" id="base.marketing_menu" sequence="85"
|
||||
groups="base.group_user"/>
|
||||
|
||||
<!-- Reporting for Marketing -->
|
||||
<menuitem name="Marketing" id="base.marketing_reporting_menu" sequence="10"
|
||||
parent="base.menu_reporting" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -48,6 +48,7 @@ professional emails and reuse templates in a few clicks.
|
|||
'views/res_config.xml',
|
||||
'views/res_partner.xml',
|
||||
'views/email_template.xml',
|
||||
'views/mass_mailing_report.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'js': [
|
||||
|
|
|
@ -5,3 +5,4 @@ import mail_mail
|
|||
import mail_thread
|
||||
import email_template
|
||||
import res_config
|
||||
import mass_mailing_report
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp import tools
|
||||
|
||||
|
||||
class MassMailingnReport(osv.Model):
|
||||
_name = 'mail.mass_mailing.report'
|
||||
_auto = False
|
||||
_description = 'Mass Mailing Analysis'
|
||||
_rec_name = 'mailing_date'
|
||||
|
||||
_columns = {
|
||||
'mailing_date': fields.datetime('Mailing Date', readonly=True),
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
""" Mass Mailing Report: based on mail.mass_mailing model that models the
|
||||
various mailing performed, and mail.mail.statistics that models the various
|
||||
statistics collected for each mailing. """
|
||||
tools.drop_view_if_exists(cr, 'mail_mass_mailing_report')
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW mail_mass_mailing_report AS (
|
||||
SELECT
|
||||
id,
|
||||
|
||||
date_trunc('day', m.date) as mailing_date
|
||||
FROM
|
||||
mail_mass_mailing m
|
||||
)""")
|
|
@ -0,0 +1,58 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_mail_mass_mailing_report_graph" model="ir.ui.view">
|
||||
<field name="name">mail.mass_mailing.report.graph</field>
|
||||
<field name="model">mail.mass_mailing.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Mass Mailing Analysis" type="pivot" stacked="True">
|
||||
<field name="mailing_date" interval="day" type="col"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_mail_mass_mailing_report_search" model="ir.ui.view">
|
||||
<field name="name">mail.mass_mailing.report.search</field>
|
||||
<field name="model">mail.mass_mailing.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Mass Mailing Analysis">
|
||||
<group expand="0" string="Extended Filters...">
|
||||
<!-- <separator orientation="vertical"/> -->
|
||||
<!-- <newline/> -->
|
||||
<field name="mailing_date"/>
|
||||
</group>
|
||||
<group expand="1" string="Group By...">
|
||||
<!-- <separator orientation="vertical" /> -->
|
||||
<filter string="Mailing Date (day)"
|
||||
domain="[]" context="{'group_by':'mailing_date:day'}"/>
|
||||
<filter string="Mailing Date (week)"
|
||||
domain="[]" context="{'group_by':'mailing_date:week'}"/>
|
||||
<filter string="Mailing Date (month)" name="mailing_date_month"
|
||||
domain="[]" context="{'group_by':'mailing_date:month'}"/>
|
||||
<filter string="Mailing Date (year)"
|
||||
domain="[]" context="{'group_by':'mailing_date:year'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Actions and Menuitems -->
|
||||
<record model="ir.actions.act_window" id="action_mail_mass_mailing_report">
|
||||
<field name="name">Leads Analysis</field>
|
||||
<field name="res_model">mail.mass_mailing.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="help">Mass Mailing Analysis allows you to check different mailing related information like the opened ratio or the mailing performances. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_mail_mass_mailing_report_graph">
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_mail_mass_mailing_report_graph"/>
|
||||
<field name="act_window_id" ref="action_mail_mass_mailing_report"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Mass Mailing Analysis" id="menu_mass_mailing_report" sequence="1"
|
||||
parent="base.marketing_reporting_menu" action="action_mail_mass_mailing_report"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue