1
# -*- coding: iso-8859-1 -*-
2
##############################################################################
4
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
6
# WARNING: This program as such is intended to be used by professional
7
# programmers who take the whole responsability of assessing all potential
8
# consequences resulting from its eventual inadequacies and bugs
9
# End users who are looking for a ready-to-use solution with commercial
10
# garantees and support are strongly adviced to contract a Free Software
13
# This program is Free Software; you can redistribute it and/or
14
# modify it under the terms of the GNU General Public License
15
# as published by the Free Software Foundation; either version 2
16
# of the License, or (at your option) any later version.
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
# GNU General Public License for more details.
23
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, write to the Free Software
25
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
##############################################################################
32
#TODO: upgraded modules
33
#TODO: removed modules
34
additional_changes_form = '''<?xml version="1.0"?>
35
<form string="Additional modules">
36
<label string="The following additional modules need to be installed:"/>
38
<field name="additional"/>
41
additional_changes_fields = {
42
'additional': {'string':'Additional modules', 'type':'one2many', 'relation':'ir.module.module', 'readonly':True},
45
class wizard_install_module(wizard.interface):
46
def _get_value(self, cr, uid, data, context):
47
service = netsvc.LocalService("object_proxy")
48
extra = service.execute(cr.dbname, uid, 'ir.module.module', 'get_extra_modules', data['ids'])
49
return {'additional': extra}
51
def _install_module(self, cr, uid, data, context):
52
service = netsvc.LocalService("object_proxy")
53
res = service.execute(cr.dbname, uid, 'ir.module.module', 'install', data['ids'])
58
'actions': [_get_value],
59
'result': {'type':'form', 'arch':additional_changes_form, 'fields':additional_changes_fields, 'state':[('install','Install'), ('end','Cancel')]}
62
'actions': [_install_module],
63
'result': {'type':'state', 'state':'end'}
66
wizard_install_module('module.module.install')