From d3a3af99f55ac19a3fcef783f96be08dc9fadbf0 Mon Sep 17 00:00:00 2001
From: ced <>
Date: Mon, 2 Jul 2007 13:22:53 +0000
Subject: [PATCH] base: remove unused function/wizard for module
bzr revid: ced-5ff234872809831672e91fb030ff13dfdc7e704f
---
bin/addons/base/module/module.py | 34 +-------------
bin/addons/base/module/module_view.xml | 9 ++--
bin/addons/base/module/module_wizard.xml | 25 ++--------
bin/addons/base/module/wizard/__init__.py | 1 -
.../module/wizard/wizard_module_info_get.py | 46 -------------------
5 files changed, 8 insertions(+), 107 deletions(-)
delete mode 100644 bin/addons/base/module/wizard/wizard_module_info_get.py
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index 0acb1b0655d..5c0ae94b845 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -158,7 +158,7 @@ class module(osv.osv):
self.write(cr, uid, ids, {'state': 'to remove'})
return True
- def button_remove_cancel(self, cr, uid, ids, context={}):
+ def button_uninstall_cancel(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state': 'installed'})
return True
def button_upgrade(self, cr, uid, ids, context={}):
@@ -279,38 +279,6 @@ class module(osv.osv):
p_id = c_id
categs = categs[1:]
self.write(cr, uid, [id], {'category_id': p_id})
-
- def info_get(self, cr, uid, ids, context={}):
- categ_obj = self.pool.get('ir.module.category')
-
- for module in self.browse(cr, uid, ids, context):
- url = module.url
- adp = tools.config['addons_path']
- info = False
- if url:
- tar = tarfile.open(mode="r|gz", fileobj=urllib.urlopen(url))
- for tarinfo in tar:
- if tarinfo.name.endswith('__terp__.py'):
- info = eval(tar.extractfile(tarinfo).read())
- elif os.path.isdir(os.path.join(adp, module.name)):
- info = self.get_module_info(module.name)
- if info:
- categ = info.get('category', 'Unclassified')
- parent = False
- for c in categ.split('/'):
- ids = categ_obj.search(cr, uid, [('name','=',c), ('parent_id','=',parent)])
- if not ids:
- parent = categ_obj.create(cr, uid, {'name':c, 'parent_id':parent})
- else:
- parent = ids[0]
- self.write(cr, uid, [module.id], {
- 'author': info.get('author',False),
- 'website': info.get('website',False),
- 'shortdesc': info.get('name',False),
- 'description': info.get('description',False),
- 'category_id': parent
- })
- return True
module()
class module_dependency(osv.osv):
diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml
index ed392c09656..3ac2a50d2e3 100644
--- a/bin/addons/base/module/module_view.xml
+++ b/bin/addons/base/module/module_view.xml
@@ -83,15 +83,12 @@
-
-
-
+
+
+
diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml
index 4e8bd7e0cba..735054f9e85 100644
--- a/bin/addons/base/module/module_wizard.xml
+++ b/bin/addons/base/module/module_wizard.xml
@@ -1,13 +1,6 @@
-
-
- Apply marked changes
- module.upgrade
-
+
-
-
Export a languagemodule.lang.export
diff --git a/bin/addons/base/module/wizard/__init__.py b/bin/addons/base/module/wizard/__init__.py
index 2cd85a6699e..eb3a3696bd3 100644
--- a/bin/addons/base/module/wizard/__init__.py
+++ b/bin/addons/base/module/wizard/__init__.py
@@ -28,7 +28,6 @@
import wizard_install_module
import wizard_update_module
import wizard_module_upgrade
-import wizard_module_info_get
import wizard_module_lang_install
import add_new
import wizard_export_lang
diff --git a/bin/addons/base/module/wizard/wizard_module_info_get.py b/bin/addons/base/module/wizard/wizard_module_info_get.py
deleted file mode 100644
index 124a6820b8b..00000000000
--- a/bin/addons/base/module/wizard/wizard_module_info_get.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-##############################################################################
-#
-# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
-# Fabien Pinckaers
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import wizard
-import netsvc
-
-class wizard_info_get(wizard.interface):
- def _update_module(self, cr, uid, data, context):
- service = netsvc.LocalService("object_proxy")
- service.execute(cr.dbname, uid, 'ir.module.module', 'info_get', data['ids'])
- return {}
-
- states = {
- 'init': {
- 'actions': [_update_module],
- 'result': {'type':'state', 'state':'end'}
- },
- }
-wizard_info_get('module.info_get')
-