diff options
| author | P. Christeas <p_christ@hol.gr> | 2008-11-04 22:12:38 +0200 |
|---|---|---|
| committer | P. Christeas <p_christ@hol.gr> | 2008-11-04 22:12:38 +0200 |
| commit | 8220e0ad02c27bbcdae91a0a04aa7e0d1cf72cef (patch) | |
| tree | ad40bb98b0fb987e07a4a48647d60509ad107a6d /bin/addons/base/module | |
| parent | 97e946c466d1dce6cb62c52ac627a2be0721cd63 (diff) | |
| parent | 1f1556ffba922823a7771ac41c1d7f3fdbaf4a29 (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')
| -rw-r--r-- | bin/addons/base/module/__init__.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/module.py | 114 | ||||
| -rw-r--r-- | bin/addons/base/module/module_view.xml | 30 | ||||
| -rw-r--r-- | bin/addons/base/module/report/__init__.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/report/ir_module_reference.rml | 4 | ||||
| -rw-r--r-- | bin/addons/base/module/report/ir_module_reference_print.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/__init__.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/add_new.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_export_lang.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_import_lang.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_module_import.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_module_lang_install.py | 36 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_module_upgrade.py | 53 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_update_module.py | 34 | ||||
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_update_translations.py | 34 |
15 files changed, 264 insertions, 313 deletions
diff --git a/bin/addons/base/module/__init__.py b/bin/addons/base/module/__init__.py index 08c2fb5917f..2e1a825c35e 100644 --- a/bin/addons/base/module/__init__.py +++ b/bin/addons/base/module/__init__.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/>. # ############################################################################## diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 836a6a3ed7d..579231724b2 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.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/>. # ############################################################################## @@ -219,6 +211,51 @@ class module(osv.osv): res[m.id] = '' return res + def _get_menus(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + menu_obj = self.pool.get('ir.ui.menu') + for m in self.browse(cr, uid, ids): + if m.state == 'installed': + menu_txt = '' + menus_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.ui.menu')]) + for data_id in model_data_obj.browse(cr,uid,menus_id): + menu_txt += menu_obj.browse(cr,uid,data_id.res_id).complete_name + '\n' + res[m.id] = menu_txt + else: + res[m.id] = '' + return res + + def _get_reports(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + report_obj = self.pool.get('ir.actions.report.xml') + for m in self.browse(cr, uid, ids): + if m.state == 'installed': + report_txt = '' + report_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.actions.report.xml')]) + for data_id in model_data_obj.browse(cr,uid,report_id): + report_txt += report_obj.browse(cr,uid,data_id.res_id).name + '\n' + res[m.id] = report_txt + else: + res[m.id] = '' + return res + + def _get_views(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + view_obj = self.pool.get('ir.ui.view') + for m in self.browse(cr, uid, ids, context=context): + if m.state == 'installed': + view_txt = '' + view_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.ui.view')]) + for data_id in model_data_obj.browse(cr,uid,view_id): + view_txt += view_obj.browse(cr,uid,data_id.res_id).name + '\n' + res[m.id] = view_txt + else: + res[m.id] = '' + return res + _columns = { 'name': fields.char("Name", size=128, readonly=True, required=True), 'category_id': fields.many2one('ir.module.category', 'Category', readonly=True), @@ -242,9 +279,16 @@ class module(osv.osv): ('to install','To be installed') ], string='State', readonly=True), 'demo': fields.boolean('Demo data'), - 'license': fields.selection([('GPL-2', 'GPL-2'),('GPL-3', 'GPL-3'), - ('Other proprietary', 'Other proprietary')], string='License', - readonly=True), + 'license': fields.selection([ + ('GPL-2', 'GPL-2'), + ('GPL-2 or any later version', 'GPL-2 or later version'), + ('GPL-3', 'GPL-3'), + ('GPL-3 or any later version', 'GPL-3 or later version'), + ('Other proprietary', 'Other proprietary') + ], string='License', readonly=True), + 'menus_by_module': fields.function(_get_menus, method=True, string='Menus', type='text'), + 'reports_by_module': fields.function(_get_reports, method=True, string='Reports', type='text'), + 'views_by_module': fields.function(_get_views, method=True, string='Views', type='text'), } _defaults = { @@ -310,7 +354,7 @@ class module(osv.osv): m.state not in ('uninstalled','uninstallable','to remove')''', (module.name,)) res = cr.fetchall() if res: - raise orm.except_orm(_('Error'), _('The module you are trying to remove depends on installed modules :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res))) + raise orm.except_orm(_('Error'), _('Some installed modules depends on the module you plan to desinstall :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res))) self.write(cr, uid, ids, {'state': 'to remove'}) return True @@ -380,7 +424,7 @@ class module(osv.osv): continue terp_file = addons.get_module_resource(name, '__terp__.py') mod_path = addons.get_module_path(name) - if os.path.isdir(mod_path) or os.path.islink(mod_path) or zipfile.is_zipfile(mod_path): + if mod_path and (os.path.isdir(mod_path) or os.path.islink(mod_path) or zipfile.is_zipfile(mod_path)): terp = self.get_module_info(mod_name) if not terp or not terp.get('installable', True): continue @@ -528,10 +572,12 @@ class module(osv.osv): self.write(cr, uid, [id], {'category_id': p_id}) def action_install(self,cr,uid,ids,context=None): - self.write(cr , uid, ids ,{'state' : 'to install'}) - self.download(cr, uid, ids, context=context) - for id in ids: - cr.execute("select m.id as id from ir_module_module_dependency d inner join ir_module_module m on (m.name=d.name) where d.module_id=%d and m.state='uninstalled'",(id,)) + for module in self.browse(cr, uid, ids, context): + if module.state <> 'uninstalled': + continue + self.write(cr , uid, [module.id] ,{'state' : 'to install'}) + self.download(cr, uid, [module.id], context=context) + cr.execute("select m.id as id from ir_module_module_dependency d inner join ir_module_module m on (m.name=d.name) where d.module_id=%d and m.state='uninstalled'",(module.id,)) dep_ids = map(lambda x:x[0],cr.fetchall()) if len(dep_ids): self.action_install(cr,uid,dep_ids,context=context) @@ -541,9 +587,9 @@ class module(osv.osv): if not filter_lang: pool = pooler.get_pool(cr.dbname) - lang_obj=pool.get('res.lang') - lang_ids=lang_obj.search(cr, uid, [('translatable', '=', True)]) - filter_lang= [lang.code for lang in lang_obj.browse(cr, uid, lang_ids)] + lang_obj = pool.get('res.lang') + lang_ids = lang_obj.search(cr, uid, [('translatable', '=', True)]) + filter_lang = [lang.code for lang in lang_obj.browse(cr, uid, lang_ids)] elif not isinstance(filter_lang, (list, tuple)): filter_lang = [filter_lang] @@ -554,7 +600,7 @@ class module(osv.osv): for lang in filter_lang: f = os.path.join(tools.config['addons_path'], mod.name, 'i18n', lang + '.po') if os.path.exists(f): - logger.notifyChannel("init", netsvc.LOG_INFO, 'addons %s: loading translation file for language %s' % (mod.name, lang)) + logger.notifyChannel("init", netsvc.LOG_INFO, 'addon %s: loading translation file for language %s' % (mod.name, lang)) tools.trans_load(cr.dbname, f, lang, verbose=False) module() diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml index dfec0514bd7..0373a729d74 100644 --- a/bin/addons/base/module/module_view.xml +++ b/bin/addons/base/module/module_view.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - + <!-- Modules Categories --> - + <record id="view_module_category_form" model="ir.ui.view"> <field name="name">ir.module.category.form</field> <field name="model">ir.module.category</field> @@ -16,7 +16,7 @@ </form> </field> </record> - + <record id="view_module_category_tree" model="ir.ui.view"> <field name="name">ir.module.category.tree</field> <field name="model">ir.module.category</field> @@ -36,9 +36,9 @@ <field name="domain">[('parent_id','=',False)]</field> </record> <menuitem action="action_module_category_tree" id="menu_action_module_category_tree" parent="base.menu_management"/> - + <!-- Click on a category --> - + <record id="action_module_open_categ" model="ir.actions.act_window"> <field name="name">Modules</field> <field name="res_model">ir.module.module</field> @@ -53,10 +53,10 @@ <field eval="'ir.actions.act_window,%d'%action_module_open_categ" name="value"/> <field eval="True" name="object"/> </record> - - + + <!-- Modules --> - + <record id="module_form" model="ir.ui.view"> <field name="name">ir.module.module.form</field> <field name="model">ir.module.module</field> @@ -95,6 +95,14 @@ </tree> </field> </page> + <page string="Features" attrs="{'invisible':[('state','!=','installed')]}"> + <separator string="Created Menus" colspan="4"/> + <field colspan="4" name="menus_by_module" nolabel="1"/> + <separator string="Created Views" colspan="2"/> + <separator string="Defined Reports" colspan="2"/> + <field colspan="2" name="views_by_module" nolabel="1"/> + <field colspan="2" name="reports_by_module" nolabel="1"/> + </page> </notebook> </form> </field> @@ -123,7 +131,7 @@ <field name="domain"/> </record> <menuitem action="open_module_tree" id="menu_module_tree" parent="base.menu_management"/> - + <record id="open_module_tree_install" model="ir.actions.act_window"> <field name="name">Installed modules</field> <field name="res_model">ir.module.module</field> @@ -148,7 +156,7 @@ <field name="domain">[('state','in', ['to upgrade', 'to remove', 'to install'])]</field> </record> <menuitem action="open_module_tree_upgrade" id="menu_module_tree_upgrade" parent="base.menu_module_tree"/> - + <record id="repository_form" model="ir.ui.view"> <field name="name">ir.module.repository.form</field> <field name="model">ir.module.repository</field> @@ -183,7 +191,7 @@ <field name="view_mode">tree,form</field> <field name="context">{'active_test': False}</field> </record> - <menuitem action="open_repository_tree" id="menu_module_repository_tree" parent="base.menu_management"/> + <menuitem action="open_repository_tree" id="menu_module_repository_tree" parent="base.menu_management"/> </data> </openerp> diff --git a/bin/addons/base/module/report/__init__.py b/bin/addons/base/module/report/__init__.py index 1617a75382f..e2e7dbdf7dd 100644 --- a/bin/addons/base/module/report/__init__.py +++ b/bin/addons/base/module/report/__init__.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/>. # ############################################################################## diff --git a/bin/addons/base/module/report/ir_module_reference.rml b/bin/addons/base/module/report/ir_module_reference.rml index e4ab73dfabb..156abdba246 100644 --- a/bin/addons/base/module/report/ir_module_reference.rml +++ b/bin/addons/base/module/report/ir_module_reference.rml @@ -112,7 +112,7 @@ <blockTable colWidths="276.0,234.0" repeatRows="1" style="Tableau2"> <tr> <td> - <para style="Standard">Name: [[ module.shortdesc]]</para> + <pre style="Standard">Name: [[ objdoc(module.shortdesc) ]]</pre> </td> <td> <para style="Standard">Version: [[module.latest_version]]</para> @@ -127,7 +127,7 @@ </td> </tr> </blockTable> - <para style="P6">[[ module.description ]]</para> + <pre style="P6">[[ module.description ]]</pre> <section> <para style="Standard">[[ repeatIn(findobj(module.name) ,'object') ]]</para> <blockTable colWidths="510.0" repeatRows="1" style="Tableau3"> diff --git a/bin/addons/base/module/report/ir_module_reference_print.py b/bin/addons/base/module/report/ir_module_reference_print.py index 83a42826bd9..b5c3468a0b3 100644 --- a/bin/addons/base/module/report/ir_module_reference_print.py +++ b/bin/addons/base/module/report/ir_module_reference_print.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/__init__.py b/bin/addons/base/module/wizard/__init__.py index 9319cbcc660..c46811e5eeb 100644 --- a/bin/addons/base/module/wizard/__init__.py +++ b/bin/addons/base/module/wizard/__init__.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/add_new.py b/bin/addons/base/module/wizard/add_new.py index 7be53d22cf6..d117ceacff2 100644 --- a/bin/addons/base/module/wizard/add_new.py +++ b/bin/addons/base/module/wizard/add_new.py @@ -1,30 +1,22 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (c) 2004-2008 TINY SPRL. (http://tiny.be) +# 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 contact 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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py index abd82cdef68..2e9751e55e5 100644 --- a/bin/addons/base/module/wizard/wizard_export_lang.py +++ b/bin/addons/base/module/wizard/wizard_export_lang.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py index f8a41dedafc..27e5eff26d8 100644 --- a/bin/addons/base/module/wizard/wizard_import_lang.py +++ b/bin/addons/base/module/wizard/wizard_import_lang.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/wizard_module_import.py b/bin/addons/base/module/wizard/wizard_module_import.py index c79c2b05980..9471ea651b3 100644 --- a/bin/addons/base/module/wizard/wizard_module_import.py +++ b/bin/addons/base/module/wizard/wizard_module_import.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/wizard_module_lang_install.py b/bin/addons/base/module/wizard/wizard_module_lang_install.py index 2ebe243b705..a3c4d6bdb99 100644 --- a/bin/addons/base/module/wizard/wizard_module_lang_install.py +++ b/bin/addons/base/module/wizard/wizard_module_lang_install.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/>. # ############################################################################## @@ -47,7 +39,7 @@ view_form = """<?xml version="1.0"?> <group colspan="2" col="4"> <separator string="System Upgrade" colspan="4"/> <label align="0.0" string="Choose a language to install:" colspan="4"/> - <field name="lang" colspan="4"/> + <field name="lang" colspan="4" required="1"/> <label align="0.0" string="Note that this operation may take a few minutes." colspan="4"/> </group> </form>""" 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): diff --git a/bin/addons/base/module/wizard/wizard_update_module.py b/bin/addons/base/module/wizard/wizard_update_module.py index 961a2db9663..1193d833d4f 100644 --- a/bin/addons/base/module/wizard/wizard_update_module.py +++ b/bin/addons/base/module/wizard/wizard_update_module.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/>. # ############################################################################## diff --git a/bin/addons/base/module/wizard/wizard_update_translations.py b/bin/addons/base/module/wizard/wizard_update_translations.py index 980eadc5d8a..83571e2e63d 100644 --- a/bin/addons/base/module/wizard/wizard_update_translations.py +++ b/bin/addons/base/module/wizard/wizard_update_translations.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/>. # ############################################################################## |
