diff options
| author | ksa (Open ERP) <ksa@tinyerp.co.in> | 2010-08-26 18:05:54 +0530 |
|---|---|---|
| committer | ksa (Open ERP) <ksa@tinyerp.co.in> | 2010-08-26 18:05:54 +0530 |
| commit | 086e88d4ce2494d8f242599db13a59418bec091b (patch) | |
| tree | 3263306437199c5a469d6a92907acb071b86ef25 /bin/addons/base/module/wizard/wizard_update_module.py | |
| parent | f917fe27b07a4e95b6bc4d02b9308f0dd34bfbe9 (diff) | |
[IMP]: convert old wizard into osv memory wizard for update module
bzr revid: ksa@tinyerp.co.in-20100826123554-2zd5yvp33slx8xfm
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_update_module.py')
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_update_module.py | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/bin/addons/base/module/wizard/wizard_update_module.py b/bin/addons/base/module/wizard/wizard_update_module.py deleted file mode 100644 index 22e52bb6d6d..00000000000 --- a/bin/addons/base/module/wizard/wizard_update_module.py +++ /dev/null @@ -1,96 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# -############################################################################## - -import wizard -import netsvc -import pooler - -class wizard_update_module(wizard.interface): - - arch = '''<?xml version="1.0"?> - <form string="Scan for new modules"> - <label string="This function will check for new modules in the 'addons' path" colspan="4" align="0.0"/> - - </form>''' - fields = { - - } - - arch_module = '''<?xml version="1.0"?> - <form string="New modules"> - <field name="update" colspan="4"/> - <field name="add" colspan="4"/> - </form>''' - - fields_module = { - 'update': {'type': 'integer', 'string': 'Number of modules updated', 'readonly': True}, - 'add': {'type': 'integer', 'string': 'Number of modules added', 'readonly': True}, - } - - def _update_module(self, cr, uid, data, context): - update, add = pooler.get_pool(cr.dbname).get('ir.module.module').update_list(cr, uid) - return {'update': update, 'add': add} - - def _action_module_open(self, cr, uid, data, context): - - res = { - 'domain': str([]), - 'name': 'Module List', - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'ir.module.module', - 'view_id': False, - 'type': 'ir.actions.act_window' - } - - search_view_id = pooler.get_pool(cr.dbname).get('ir.ui.view').search(cr, uid, [('name','=','ir.module.module.list.select')], context=context) - if search_view_id: - res.update({'search_view_id' : search_view_id[0]}) - return res - - states = { - 'init': { - 'actions': [], - 'result': {'type': 'form', 'arch': arch, 'fields': fields, - 'state': [ - ('end', 'Cancel', 'gtk-cancel'), - ('update', 'Check new modules', 'gtk-ok', True) - ] - } - }, - 'update': { - 'actions': [_update_module], - 'result': {'type': 'form', 'arch': arch_module, 'fields': fields_module, - 'state': [ - ('open_window', 'Ok', 'gtk-ok', True) - ] - } - }, - 'open_window': { - 'actions': [], - 'result': {'type': 'action', 'action': _action_module_open, 'state':'end'} - } - } -wizard_update_module('module.module.update') - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - |
