add config for signup
[odoo/odoo.git] / addons / base_setup / res_config.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Business Applications
5 #    Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
6 #
7 #    This program is free software: you can redistribute it and/or modify
8 #    it under the terms of the GNU Affero General Public License as
9 #    published by the Free Software Foundation, either version 3 of the
10 #    License, or (at your option) any later version.
11 #
12 #    This program is distributed in the hope that it will be useful,
13 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 #    GNU Affero General Public License for more details.
16 #
17 #    You should have received a copy of the GNU Affero General Public License
18 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #
20 ##############################################################################
21
22 from osv import osv, fields
23
24 class base_config_settings(osv.osv_memory):
25     _name = 'base.config.settings'
26     _inherit = 'res.config.settings'
27     _columns = {
28         'module_multi_company': fields.boolean('manage multiple companies',
29             help="""Work in multi-company environments, with appropriate security access between companies.
30                 This installs the module multi_company."""),
31         'module_portal': fields.boolean('activate customer portal',
32             help="""The portal will give access to a series of documents for your  customers; his quotations, his invoices, his projects, etc."""),
33         'module_share': fields.boolean('allow documents sharing',
34             help="""As an example, you will be able to share a project or some tasks to  your customers, or quotes/sales to several persons at your customer  company, or your agenda availabilities to your contacts."""),
35         'module_auth_signup': fields.boolean('allow new users to sign up'),
36         'module_auth_oauth': fields.boolean('external oauth authentfication (google, facebook, ...)'),
37     }
38
39     def open_company(self, cr, uid, ids, context=None):
40         user = self.pool.get('res.users').browse(cr, uid, uid, context)
41         return {
42             'type': 'ir.actions.act_window',
43             'name': 'Your Company',
44             'view_type': 'form',
45             'view_mode': 'form',
46             'res_model': 'res.company',
47             'res_id': user.company_id.id,
48             'target': 'current',
49         }
50
51 # Preferences wizard for Sales & CRM.
52 # It is defined here because it is inherited independently in modules sale, crm,
53 # plugin_outlook and plugin_thunderbird.
54 class sale_config_settings(osv.osv_memory):
55     _name = 'sale.config.settings'
56     _inherit = 'res.config.settings'
57     _columns = {
58         'module_web_linkedin': fields.boolean('get contacts automatically from LinkedIn',
59             help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
60         'module_crm': fields.boolean('CRM'),
61         'module_plugin_thunderbird': fields.boolean('enable Thunderbird plugin',
62             help="""The plugin allows you archive email and its attachments to the selected
63                 OpenERP objects. You can select a partner, or a lead and
64                 attach the selected mail as a .eml file in
65                 the attachment of a selected record. You can create documents for CRM Lead,
66                 Partner from the selected emails.
67                 This installs the module plugin_thunderbird."""),
68         'module_plugin_outlook': fields.boolean('enable Outlook plugin',
69             help="""The Outlook plugin allows you to select an object that you would like to add
70                 to your email and its attachments from MS Outlook. You can select a partner,
71                 or a lead object and archive a selected
72                 email into an OpenERP mail message with attachments.
73                 This installs the module plugin_outlook."""),
74     }
75
76 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: