summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/wizard/wizard_module_upgrade.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2008-11-04 22:12:38 +0200
committerP. Christeas <p_christ@hol.gr>2008-11-04 22:12:38 +0200
commit8220e0ad02c27bbcdae91a0a04aa7e0d1cf72cef (patch)
treead40bb98b0fb987e07a4a48647d60509ad107a6d /bin/addons/base/module/wizard/wizard_module_upgrade.py
parent97e946c466d1dce6cb62c52ac627a2be0721cd63 (diff)
parent1f1556ffba922823a7771ac41c1d7f3fdbaf4a29 (diff)
Merge commit 'origin/master' into mdv-gpl3
Conflicts: bin/tools/convert.py bzr revid: p_christ@hol.gr-20081025224421-g367ati5b2eeplw6 bzr revid: p_christ@hol.gr-20081104201238-oy0vgsunt2jxgu2p
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_module_upgrade.py')
-rw-r--r--bin/addons/base/module/wizard/wizard_module_upgrade.py53
1 files changed, 19 insertions, 34 deletions
diff --git a/bin/addons/base/module/wizard/wizard_module_upgrade.py b/bin/addons/base/module/wizard/wizard_module_upgrade.py
index 15a0195b151..64db951bdf3 100644
--- a/bin/addons/base/module/wizard/wizard_module_upgrade.py
+++ b/bin/addons/base/module/wizard/wizard_module_upgrade.py
@@ -1,30 +1,22 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
-# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) All Rights Reserved.
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+# $Id$
#
-# $Id$
+# 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 3 of the License, or
+# (at your option) any later version.
#
-# 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 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.
#
-# 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.
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -87,26 +79,19 @@ class wizard_info_get(wizard.interface):
db, pool = pooler.get_db_and_pool(cr.dbname)
cr = db.cursor()
mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [
- ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- unmet_packages=[]
+ ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])])
+ unmet_packages = []
mod_dep_obj = pool.get('ir.module.module.dependency')
- for mod in mod_obj.browse(cr,uid,ids):
- depends_mod_ids=mod_dep_obj.search(cr,uid,[('module_id','=',mod.id)])
- for dep_mod in mod_dep_obj.browse(cr,uid,depends_mod_ids):
+ for mod in mod_obj.browse(cr, uid, ids):
+ depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
+ for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
if dep_mod.state in ('unknown','uninstalled'):
unmet_packages.append(dep_mod.name)
if len(unmet_packages):
- raise wizard.except_wizard('Unmet dependency !','Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
+ raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
mod_obj.download(cr, uid, ids, context=context)
cr.commit()
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
-
- # Update translations for all installed languages
- cr = db.cursor()
- modobj = pool.get('ir.module.module')
- mids = modobj.search(cr, uid, [('state', '=', 'installed')])
- modobj.update_translations(cr, uid, mids, None)
return {}
def _config(self, cr, uid, data, context=None):