[FIX] web: on launching ir_actions_act_window, reset the active_* params if the targe...
[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 openerp.osv import fields
23 from openerp.osv import osv
24 import base64
25 from openerp.tools.translate import _
26
27 class base_report_designer_installer(osv.osv_memory):
28     _name = 'base_report_designer.installer'
29     _inherit = 'res.config.installer'
30
31     def default_get(self, cr, uid, fields, context=None):
32         data = super(base_report_designer_installer, self).default_get(cr, uid, fields, context=context)
33         base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
34         data['plugin_file'] = base_url + '/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip'
35         return data
36
37     _columns = {
38         'name':fields.char('File name', size=34),
39         'plugin_file':fields.char('OpenObject Report Designer Plug-in', size=256, readonly=True, help="OpenObject Report Designer plug-in file. Save as this file and install this plug-in in OpenOffice."),
40         'description':fields.text('Description', readonly=True)
41     }
42
43     _defaults = {
44         'name' : 'openerp_report_designer.zip',
45         'description' : """
46         * Save the OpenERP Report Designer plug-­in.
47         * Follow these steps to install plug-­in.
48             1. Open Extension Manager window from Menu Bar of Openoffice writer, Open Tools > Extension Menu.
49             2. Click on "Add" button.
50             3. Select path where the openerp_report_designer.zip is located.
51             4. On the completion of adding package you will get your package under 'Extension Manager' and the status of your package become 'Enabled'.
52             5. Restart openoffice writer.
53         * Follow the steps to configure OpenERP Report Designer plug-­in in Openoffice writer.
54             1. Connect OpenERP Server from Menu bar , OpenERP Report Designer > Server parameter.
55             2. Select Server url, database and provide user name and password
56             3. Click "Connect".
57             4. if your connection success, A message appears like 'You can start creating your report in current document.'.
58         """
59     }
60 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
61