From e4a76df9a851e8e1ba203eecd16197bdac52a1c3 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 22 Jan 2010 11:42:47 +0100 Subject: [PATCH] [rem] base_setup: old wizard, been replaced by osv_memory-based views and res.config objects bzr revid: xmo@tinyerp.com-20100122104247-kjlg7qxez3zlyaiw --- addons/base_setup/__terp__.py | 1 - addons/base_setup/base_setup_wizard.xml | 6 - addons/base_setup/wizard/__init__.py | 26 ----- addons/base_setup/wizard/wizard_base_setup.py | 106 ------------------ 4 files changed, 139 deletions(-) delete mode 100644 addons/base_setup/base_setup_wizard.xml delete mode 100644 addons/base_setup/wizard/__init__.py delete mode 100644 addons/base_setup/wizard/wizard_base_setup.py diff --git a/addons/base_setup/__terp__.py b/addons/base_setup/__terp__.py index 7166450fdaa..c6dd64d7bcc 100644 --- a/addons/base_setup/__terp__.py +++ b/addons/base_setup/__terp__.py @@ -42,7 +42,6 @@ 'depends': ['base'], 'init_xml': ['base_setup_data.xml'], 'update_xml': ['security/ir.model.access.csv', - 'base_setup_wizard.xml', 'base_setup_installer.xml', 'base_setup_todo.xml',], 'demo_xml': ['base_setup_demo.xml'], diff --git a/addons/base_setup/base_setup_wizard.xml b/addons/base_setup/base_setup_wizard.xml deleted file mode 100644 index 9a48bf41f6c..00000000000 --- a/addons/base_setup/base_setup_wizard.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/addons/base_setup/wizard/__init__.py b/addons/base_setup/wizard/__init__.py deleted file mode 100644 index a322ae346b3..00000000000 --- a/addons/base_setup/wizard/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -import wizard_base_setup - - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/base_setup/wizard/wizard_base_setup.py b/addons/base_setup/wizard/wizard_base_setup.py deleted file mode 100644 index b59e346882d..00000000000 --- a/addons/base_setup/wizard/wizard_base_setup.py +++ /dev/null @@ -1,106 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# 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 . -# -############################################################################## - -import wizard -import pooler -import time -import tools -import os - -view_form_finish = ''' -
- - - - -
-''' - -class wizard_base_setup(wizard.interface): - - def _menu(self, cr, uid, data, context): - users_obj=pooler.get_pool(cr.dbname).get('res.users') - action_obj=pooler.get_pool(cr.dbname).get('ir.actions.act_window') - - ids=action_obj.search(cr, uid, [('name', '=', 'Menu')]) - menu=action_obj.browse(cr, uid, ids)[0] - - ids=users_obj.search(cr, uid, [('action_id', '=', 'Setup')]) - users_obj.write(cr, uid, ids, {'action_id': menu.id}) - ids=users_obj.search(cr, uid, [('menu_id', '=', 'Setup')]) - users_obj.write(cr, uid, ids, {'menu_id': menu.id}) - - return { - 'name': menu.name, - 'type': menu.type, - 'view_id': (menu.view_id and\ - (menu.view_id.id, menu.view_id.name)) or False, - 'domain': menu.domain, - 'res_model': menu.res_model, - 'src_model': menu.src_model, - 'view_type': menu.view_type, - 'view_mode': menu.view_mode, - 'views': menu.views, - } - - def _config(self, cr, uid, data, context=None): - pool = pooler.get_pool(cr.dbname) - users_obj=pool.get('res.users') - action_obj=pool.get('ir.actions.act_window') - - ids=action_obj.search(cr, uid, [('name', '=', 'Menu')]) - menu=action_obj.browse(cr, uid, ids)[0] - - ids=users_obj.search(cr, uid, [('action_id', '=', 'Setup')]) - users_obj.write(cr, uid, ids, {'action_id': menu.id}) - ids=users_obj.search(cr, uid, [('menu_id', '=', 'Setup')]) - users_obj.write(cr, uid, ids, {'menu_id': menu.id}) - - return pool.get('res.config').next(cr, uid, [], context=context) - - states={ - 'init':{ - 'result': {'type': 'form', 'arch': view_form_finish, 'fields': {}, - 'state': [ - ('menu', 'Use Directly', 'gtk-ok'), - ('config', 'Start Configuration', 'gtk-go-forward', True) - ] - } - }, - 'config': { - 'result': { - 'type': 'action', - 'action': _config, - 'state': 'end', - }, - }, - 'menu': { - 'actions': [], - 'result': {'type': 'action', 'action': _menu, 'state': 'end'} - }, - } - -wizard_base_setup('base_setup.base_setup') - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: -