[REF] [ADD] marketing: marketing config + CRM-related stuff module reordering

- marketing module now holds only the basic stuff for marketing related
modules: mainly marketing settings + menu definition
- marketing_crm new module is a bridge between crm and marketing and
holds the crm-related stuff previously present in marketing module.

bzr revid: tde@openerp.com-20140313120503-rgvs8uysr0c6zv11
This commit is contained in:
Thibault Delavallée 2014-03-13 13:05:03 +01:00
parent b92001f1d8
commit 676189cbf7
12 changed files with 151 additions and 101 deletions

View File

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -1,29 +1,9 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Marketing',
'version': '1.1',
'depends': ['base', 'base_setup', 'crm'],
'depends': ['base', 'base_setup'],
'author': 'OpenERP SA',
'category': 'Hidden/Dependency',
'description': """
@ -35,7 +15,6 @@ Contains the installer for marketing-related modules.
'website': 'http://www.openerp.com',
'data': [
'security/marketing_security.xml',
'security/ir.model.access.csv',
'marketing_view.xml',
'res_config_view.xml',
],
@ -44,4 +23,3 @@ Contains the installer for marketing-related modules.
'auto_install': False,
'images': ['images/config_marketing.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -3,39 +3,8 @@
<data>
<!-- Top menu item -->
<menuitem name="Marketing"
id="base.marketing_menu"
groups="base.group_user"
sequence="85"/>
<menuitem name="Marketing" id="base.marketing_menu" sequence="85"
groups="base.group_user"/>
<record id="view_crm_lead_form" model="ir.ui.view">
<field name="name">crm.lead.inherit.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='categorization']" position="attributes">
<attribute name="string">Marketing</attribute>
<attribute name="groups"></attribute>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
<field name="type_id"/>
<field name="channel_id" widget="selection"/>
</xpath>
</field>
</record>
<record id="view_crm_opportunity_form" model="ir.ui.view">
<field name="name">crm.lead.inherit.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='mailings']" position="before">
<group string="Marketing">
<field name="type_id" />
<field name="channel_id" widget="selection"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -1,40 +1,19 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from openerp.osv import fields, osv
class marketing_config_settings(osv.osv_memory):
class marketing_config_settings(osv.TransientModel):
_name = 'marketing.config.settings'
_inherit = 'res.config.settings'
_columns = {
'module_marketing_campaign': fields.boolean('Marketing campaigns',
'module_mass_mailing': fields.boolean(
'Mass Mailing',
help='Provide a way to perform mass mailings.\n'
'-This installs the module mass_mailing.'),
'module_marketing_campaign': fields.boolean(
'Marketing campaigns',
help='Provides leads automation through marketing campaigns. '
'Campaigns can in fact be defined on any resource, not just CRM leads.\n'
'-This installs the module marketing_campaign.'),
'module_marketing_campaign_crm_demo': fields.boolean('Demo data for marketing campaigns',
help='Installs demo data like leads, campaigns and segments for Marketing Campaigns.\n'
'-This installs the module marketing_campaign_crm_demo.'),
'module_crm_profiling': fields.boolean('Track customer profile to focus your campaigns',
help='Allows users to perform segmentation within partners.\n'
'-This installs the module crm_profiling.'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,24 +11,25 @@
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
or
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
</header>
<separator string="Campaigns"/>
<separator string="Mass Mailing"/>
<group>
<label for="id" string="Campaigns Settings"/>
<label for="id" string="Settings"/>
<div>
<div>
<div name="module_mass_mailing">
<field name="module_mass_mailing" class="oe_inline"/>
<label for="module_mass_mailing"/>
</div>
</div>
</group>
<separator string="Marketing Campaigns"/>
<group>
<label for="id" string="Settings"/>
<div>
<div name="module_marketing_campaign">
<field name="module_marketing_campaign" class="oe_inline"/>
<label for="module_marketing_campaign"/>
</div>
<div attrs="{'invisible':[('module_marketing_campaign','=',False)]}">
<field name="module_marketing_campaign_crm_demo" class="oe_inline"/>
<label for="module_marketing_campaign_crm_demo"/>
</div>
<div>
<field name="module_crm_profiling" class="oe_inline"/>
<label for="module_crm_profiling"/>
</div>
</div>
</group>
</form>

View File

@ -1 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink

View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import models

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
{
'name': 'Marketing in CRM',
'version': '1.0',
'depends': ['marketing', 'crm'],
'author': 'OpenERP SA',
'category': 'Hidden/Dependency',
'description': """
Bridge module between marketing and CRM
""",
'website': 'http://www.openerp.com',
'data': [
'views/crm.xml',
'views/res_config.xml',
],
'demo': [],
'installable': True,
'auto_install': True,
}

View File

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
import res_config

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class CrmMarketingConfig(osv.TransientModel):
_name = 'marketing.config.settings'
_inherit = 'marketing.config.settings'
_columns = {
'module_marketing_campaign_crm_demo': fields.boolean(
'Demo data for marketing campaigns',
help='Installs demo data like leads, campaigns and segments for Marketing Campaigns.\n'
'-This installs the module marketing_campaign_crm_demo.'),
'module_crm_profiling': fields.boolean(
'Track customer profile to focus your campaigns',
help='Allows users to perform segmentation within partners.\n'
'-This installs the module crm_profiling.'),
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<openerp>
<data>
<record id="view_crm_lead_form" model="ir.ui.view">
<field name="name">crm.lead.inherit.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='categorization']" position="attributes">
<attribute name="string">Marketing</attribute>
<attribute name="groups"></attribute>
</xpath>
<xpath expr="//field[@name='company_id']" position="after">
<field name="type_id"/>
<field name="channel_id" widget="selection"/>
</xpath>
</field>
</record>
<record id="view_crm_opportunity_form" model="ir.ui.view">
<field name="name">crm.lead.inherit.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<xpath expr="//group[@name='mailings']" position="before">
<group string="Marketing">
<field name="type_id" />
<field name="channel_id" widget="selection"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_marketing_configuration" model="ir.ui.view">
<field name="name">marketing.config.settings.crm</field>
<field name="model">marketing.config.settings</field>
<field name="inherit_id" ref="marketing.view_marketing_configuration"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='module_marketing_campaign']" position="after">
<div attrs="{'invisible':[('module_marketing_campaign','=',False)]}">
<field name="module_marketing_campaign_crm_demo" class="oe_inline"/>
<label for="module_marketing_campaign_crm_demo"/>
</div>
<div>
<field name="module_crm_profiling" class="oe_inline"/>
<label for="module_crm_profiling"/>
</div>
</xpath>
</field>
</record>
</data>
</openerp>