[TYPO] Set the right category for the Point Of Sale
[odoo/odoo.git] / addons / base_report_designer / installer.py
1 # -*- coding: utf-8 -*-
2 ##############################################################################
3 #
4 #    OpenERP, Open Source Management Solution
5 #    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
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 fields
23 from osv import osv
24 import base64
25 from tools.translate import _
26 import addons
27
28 class base_report_designer_installer(osv.osv_memory):
29     _name = 'base_report_designer.installer'
30     _inherit = 'res.config.installer'
31
32     def default_get(self, cr, uid, fields, context=None):
33         data = super(base_report_designer_installer, self).default_get(cr, uid, fields, context=context)
34         plugin_file = open(addons.get_module_resource('base_report_designer','plugin', 'openerp_report_designer.zip'),'rb')
35         data['plugin_file'] = base64.encodestring(plugin_file.read())
36         return data
37
38     _columns = {
39         'name':fields.char('File name', size=34),
40         'plugin_file':fields.binary('OpenObject Report Designer Plug-in', readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
41         'description':fields.text('Description', readonly=True)
42     }
43
44     _defaults = {
45         'name' : 'openerp_report_designer.zip',
46         'description' : """
47         * Save the OpenERP Report Designer plug-­in.
48         * Follow these steps to install plug-­in.
49             1. Open Extension Manager window from Menu Bar of Openoffice writer, Open Tools > Extension Menu.
50             2. Click on "Add" button.
51             3. Select path where the openerp_report_designer.zip is located.
52             4. On the completion of adding package you will get your package under 'Extension Manager' and the status of your package become 'Enabled'.
53             5. Restart openoffice writer.
54         * Follow the steps to configure OpenERP Report Designer plug-­in in Openoffice writer.
55             1. Connect OpenERP Server from Menu bar , OpenERP Report Designer > Server parameter.
56             2. Select Server url, database and provide user name and password
57             3. Click "Connect".
58             4. if your connection success, A message appears like 'You can start creating your report in current document.'.
59         """
60     }
61 base_report_designer_installer()
62 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
63