From d56385b55f4eac78fdf944711fde2c9d1f15b556 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 30 Mar 2012 15:55:46 +0200 Subject: [PATCH] [IMP] sale.config.settings: show the 'Emails' section only when crm is installed bzr revid: rco@openerp.com-20120330135546-jnmi8nbdmdg42rt7 --- addons/base_setup/base_setup.py | 19 +++++++- addons/base_setup/base_setup_views.xml | 11 ++++- addons/crm/res_config_view.xml | 6 ++- addons/crm_claim/res_config_view.xml | 3 +- addons/mail/__init__.py | 1 - addons/mail/__openerp__.py | 1 - addons/mail/res_config.py | 43 ------------------- addons/mail/res_config_view.xml | 24 ----------- addons/plugin_outlook/plugin_outlook.xml | 4 +- .../plugin_thunderbird/plugin_thunderbird.xml | 4 +- 10 files changed, 38 insertions(+), 78 deletions(-) delete mode 100644 addons/mail/res_config.py delete mode 100644 addons/mail/res_config_view.xml diff --git a/addons/base_setup/base_setup.py b/addons/base_setup/base_setup.py index 19c053bae14..a3effd98148 100644 --- a/addons/base_setup/base_setup.py +++ b/addons/base_setup/base_setup.py @@ -204,10 +204,27 @@ class specify_partner_terminology(osv.osv_memory): # Preferences wizard for Sales & CRM. -# It is defined here because it must be inherited independently in modules sale and crm. +# It is defined here because it is inherited independently in modules sale, crm, +# plugin_outlook and plugin_thunderbird. # class sale_config_settings(osv.osv_memory): _name = 'sale.config.settings' _inherit = 'res.config.settings' + _columns = { + 'module_crm': fields.boolean('CRM'), + 'module_plugin_thunderbird': fields.boolean('Thunderbird plugin', + help="""The plugin allows you archive email and its attachments to the selected + OpenERP objects. You can select a partner, a task, a project, an analytical + account, or any other object and attach the selected mail as a .eml file in + the attachment of a selected record. You can create documents for CRM Lead, + HR Applicant and Project Issue from the selected emails. + This installs the module plugin_thunderbird."""), + 'module_plugin_outlook': fields.boolean('Outlook plugin', + help="""The Outlook plugin allows you to select an object that you would like to add + to your email and its attachments from MS Outlook. You can select a partner, a task, + a project, an analytical account, or any other object and archive a selected + email into an OpenERP mail message with attachments. + This installs the module plugin_outlook."""), + } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_setup/base_setup_views.xml b/addons/base_setup/base_setup_views.xml index 861a8f32e2a..b720527da1d 100644 --- a/addons/base_setup/base_setup_views.xml +++ b/addons/base_setup/base_setup_views.xml @@ -149,7 +149,16 @@
- + + + + + + + + + + diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml index ea9038c79b5..85d57e682e3 100644 --- a/addons/crm/res_config_view.xml +++ b/addons/crm/res_config_view.xml @@ -2,13 +2,13 @@ - + crm settings sale.config.settings form - + @@ -18,7 +18,9 @@ + + diff --git a/addons/crm_claim/res_config_view.xml b/addons/crm_claim/res_config_view.xml index 37d985b8a1e..c6c66290303 100644 --- a/addons/crm_claim/res_config_view.xml +++ b/addons/crm_claim/res_config_view.xml @@ -9,7 +9,7 @@ - + @@ -19,6 +19,7 @@ + diff --git a/addons/mail/__init__.py b/addons/mail/__init__.py index 72164b89865..4787883ef9c 100644 --- a/addons/mail/__init__.py +++ b/addons/mail/__init__.py @@ -23,7 +23,6 @@ import mail_message import mail_thread import res_partner import wizard -import res_config # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail/__openerp__.py b/addons/mail/__openerp__.py index 1cad3fafa5d..8085d301364 100644 --- a/addons/mail/__openerp__.py +++ b/addons/mail/__openerp__.py @@ -62,7 +62,6 @@ The main features are: "res_partner_view.xml", 'security/ir.model.access.csv', 'mail_data.xml', - 'res_config_view.xml', ], 'installable': True, 'auto_install': False, diff --git a/addons/mail/res_config.py b/addons/mail/res_config.py deleted file mode 100644 index 89038a43610..00000000000 --- a/addons/mail/res_config.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -from osv import fields, osv - -class plugin_configuration(osv.osv_memory): - _inherit = 'sale.config.settings' - - _columns = { - 'module_plugin_thunderbird': fields.boolean('Thunderbird plugin', - help="""The plugin allows you archive email and its attachments to the selected - OpenERP objects. You can select a partner, a task, a project, an analytical - account, or any other object and attach the selected mail as a .eml file in - the attachment of a selected record. You can create documents for CRM Lead, - HR Applicant and Project Issue from the selected emails. - This installs the module plugin_thunderbird."""), - 'module_plugin_outlook': fields.boolean('Outlook plugin', - help="""The Outlook plugin allows you to select an object that you would like to add - to your email and its attachments from MS Outlook. You can select a partner, a task, - a project, an analytical account, or any other object and archive a selected - email into an OpenERP mail message with attachments. - This installs the module plugin_outlook."""), - } - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail/res_config_view.xml b/addons/mail/res_config_view.xml deleted file mode 100644 index 4aee146d7f4..00000000000 --- a/addons/mail/res_config_view.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - mail plugins settings - sale.config.settings - form - - - - - - - - - - - - - - - - - diff --git a/addons/plugin_outlook/plugin_outlook.xml b/addons/plugin_outlook/plugin_outlook.xml index d16907306d1..d2671859c79 100644 --- a/addons/plugin_outlook/plugin_outlook.xml +++ b/addons/plugin_outlook/plugin_outlook.xml @@ -53,10 +53,10 @@ Sales Application sale.config.settings form - + - +