[IMP]project_timesheet:added method for setting default type of invoicing
[odoo/odoo.git] / addons / base_setup / res_config.py
index f6c2e72..0dc4a0f 100644 (file)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
 #
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#    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
 #
 ##############################################################################
 
-from osv import fields, osv
+from osv import osv, fields
 
-class general_configuration(osv.osv_memory):
-    _name = 'general.configuration'
+class base_config_settings(osv.osv_memory):
+    _name = 'base.config.settings'
     _inherit = 'res.config.settings'
-    
     _columns = {
-        'module_multi_company': fields.boolean('Active Multi company',
-                           help ="""It allow to installs the multi_company module."""),
-        'module_portal': fields.boolean('Customer Portal',
-                           help ="""It installs the portal module."""),
-        'module_share': fields.boolean('Share',
-                           help ="""It installs the share module."""),
-        'module_base_report_designer': fields.boolean('Customise your OpenERP Report with OpenOffice',
-                           help ="""It installs the base_report_designer module."""),
-        'module_report_webkit': fields.boolean('Design OpenERP report in HTML',
-                           help ="""It installs the report_webkit module."""),
-        'module_report_webkit_sample': fields.boolean('Samples of HTML report design',
-                           help ="""It installs the report_webkit_sample module."""),                
+        'module_multi_company': fields.boolean('Manage multiple companies',
+            help="""Work in multi-company environments, with appropriate security access between companies.
+                This installs the module multi_company."""),
+        'module_share': fields.boolean('Allow documents sharing',
+            help="""Share or embbed any screen of openerp."""),
+        'module_portal': fields.boolean('Activate the customer/supplier portal',
+            help="""Give access your customers and suppliers to their documents."""),
+        'module_auth_anonymous': fields.boolean('Activate the public portal',
+            help="""Enable the public part of openerp, openerp becomes a public website."""),
+        'module_auth_oauth': fields.boolean('Use external authentication providers, sign in with google, facebook, ...'),
+        'module_base_import': fields.boolean("Allow users to import data from CSV files"),
     }
 
-    def base_setup_company(self, cr, uid, ids, context=None):
-        if context is None:
-            context = {}
-        data_obj = self.pool.get('ir.model.data')
-        user = self.pool.get('res.users').browse(cr, uid, uid)
-        context.update({'res_id': user.company_id.id})
-        company_view_id = data_obj.get_object_reference(cr, uid, 'base', 'view_company_form')
-        if company_view_id:
-            company_view_id = company_view_id and company_view_id[1] or False
+    def open_company(self, cr, uid, ids, context=None):
+        user = self.pool.get('res.users').browse(cr, uid, uid, context)
         return {
-            'view_mode': 'form',
+            'type': 'ir.actions.act_window',
+            'name': 'Your Company',
             'view_type': 'form',
+            'view_mode': 'form',
             'res_model': 'res.company',
-            'res_id': int(context.get('res_id')),
-            'views': [(company_view_id, 'form')],
-            'type': 'ir.actions.act_window',
+            'res_id': user.company_id.id,
             'target': 'current',
-            'nodestroy':True,
-            'context': context,
         }
 
-general_configuration()
+# Preferences wizard for Sales & 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_web_linkedin': fields.boolean('Get contacts automatically from linkedIn',
+            help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
+        'module_crm': fields.boolean('CRM'),
+        'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plugin',
+            help="""The plugin allows you archive email and its attachments to the selected
+                OpenERP objects. You can select a partner, or a lead and
+                attach the selected mail as a .eml file in
+                the attachment of a selected record. You can create documents for CRM Lead,
+                Partner from the selected emails.
+                This installs the module plugin_thunderbird."""),
+        'module_plugin_outlook': fields.boolean('Enable 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,
+                or a lead 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: