diff options
| author | ced <> | 2007-07-02 13:22:53 +0000 |
|---|---|---|
| committer | ced <> | 2007-07-02 13:22:53 +0000 |
| commit | d3a3af99f55ac19a3fcef783f96be08dc9fadbf0 (patch) | |
| tree | 02f6a42e6ad65962bcbc7e9c31540a9c5ce1cf19 | |
| parent | 0a31058c9a91cd246874afa3089cb4ab38a78549 (diff) | |
base: remove unused function/wizard for module
bzr revid: ced-5ff234872809831672e91fb030ff13dfdc7e704f
| -rw-r--r-- | bin/addons/base/module/module.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/module_view.xml | 9 | ||||
| -rw-r--r-- | bin/addons/base/module/module_wizard.xml | 25 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/__init__.py | 1 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_module_info_get.py | 46 |
5 files changed, 8 insertions, 107 deletions
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 @@ <field name="demo" readonly="1"/> <field name="state" readonly="1" select="1"/> <group col="7" colspan="2"> - <button string="Update Infos" name="info_get" type="object" states="uninstalled,installed,to upgrade,to remove"/> - <button string="Cancel Install" name="button_install_cancel" type="object" states="to install"/> <button string="Install" name="button_install" type="object" states="uninstalled"/> - <!-- - <button string="Cancel Upgrade" name="button_upgrade_cancel" type="object" states="to upgrade"/> - <button string="Cancel Remove" name="button_remove_cancel" type="object" states="to remove"/> - --> + <button string="Cancel Install" name="button_install_cancel" type="object" states="to install"/> <button string="Uninstall" name="button_uninstall" type="object" states="installed"/> + <button string="Cancel Uninstall" name="button_uninstall_cancel" type="object" states="to remove"/> <button string="Upgrade" name="button_upgrade" type="object" states="installed"/> + <button string="Cancel Upgrade" name="button_upgrade_cancel" type="object" states="to upgrade"/> <!-- <button string="Update translations" name="button_update_translations" type="object" states="installed"/> --> 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 @@ <?xml version="1.0"?> <terp> <data> - <!-- - <wizard - id="wizard_info_get" - string="Request Info" - model="ir.module.module" - name="module.info_get"/> - --> <wizard string="Import module" model="ir.module.module" @@ -31,10 +24,10 @@ icon="STOCK_CONVERT" id="menu_module_update"/> - <record model="ir.actions.wizard" id="wizard_upgrade"> - <field name="name">Apply marked changes</field> - <field name="wiz_name">module.upgrade</field> - </record> + <wizard string="Apply Upgrades" + model="ir.module.module" + name="module.upgrade" + id="wizard_upgrade"/> <menuitem name="Administration/Modules Management/Apply Upgrades" action="wizard_upgrade" @@ -51,16 +44,6 @@ id="menu_wizard_lang_install" type="wizard"/> - <!--record model="ir.actions.wizard" id="wizard_scan_addons"> - <field name="name">Scan 'addons' path</field> - <field name="wiz_name">module.module.scan</field> - </record> - <menuitem - name="Administration/Modules Management/Update modules list" - action="wizard_scan_addons" - id="menu_wizard_module_scan" - type="wizard" /--> - <record model="ir.actions.wizard" id="wizard_lang_export"> <field name="name">Export a language</field> <field name="wiz_name">module.lang.export</field> 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 <fp@tiny.Be> -# -# 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') - |
