diff --git a/bin/addons/base/__openerp__.py b/bin/addons/base/__openerp__.py index c56bf67a90c..2592ed1bf00 100644 --- a/bin/addons/base/__openerp__.py +++ b/bin/addons/base/__openerp__.py @@ -48,21 +48,28 @@ 'module/module_web_view.xml', 'module/module_data.xml', 'module/module_report.xml', + 'module/wizard/base_module_import_view.xml', + 'module/wizard/base_module_update_view.xml', + 'module/wizard/base_language_install_view.xml', 'res/res_request_view.xml', 'res/res_lang_view.xml', 'res/res_log_view.xml', 'res/partner/partner_report.xml', 'res/partner/partner_view.xml', - 'res/partner/partner_wizard.xml', 'res/bank_view.xml', 'res/country_view.xml', - 'res/res_currency_view.xml', + 'res/res_currency_view.xml', 'res/partner/crm_view.xml', 'res/partner/wizard/partner_sms_send_view.xml', + 'res/partner/wizard/partner_wizard_spam_view.xml', + 'res/partner/wizard/partner_clear_ids_view.xml', + 'res/partner/wizard/partner_wizard_ean_check_view.xml', 'res/partner/partner_data.xml', + 'res/ir_property_view.xml', 'security/base_security.xml', 'maintenance/maintenance_view.xml', + 'security/ir.model.access.csv' ], diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml index af1e577412f..341547c96a4 100644 --- a/bin/addons/base/module/module_wizard.xml +++ b/bin/addons/base/module/module_wizard.xml @@ -1,30 +1,11 @@ - - Import module - base.module.import - - - - - Update Modules List - module.module.update - - - - - - Load an Official Translation - module.lang.install - - - Export a Translation File wizard.module.lang.export diff --git a/bin/addons/base/module/wizard/__init__.py b/bin/addons/base/module/wizard/__init__.py index c0af5977b21..e43bbbdca07 100644 --- a/bin/addons/base/module/wizard/__init__.py +++ b/bin/addons/base/module/wizard/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,19 +15,20 @@ # 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 . +# along with this program. If not, see . # ############################################################################## -import wizard_update_module import wizard_module_upgrade import wizard_configuration -import wizard_module_lang_install import add_new import wizard_export_lang import wizard_import_lang -import wizard_module_import import wizard_update_translations +import base_module_import +import base_module_update +import base_language_install + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bin/addons/base/module/wizard/base_language_install.py b/bin/addons/base/module/wizard/base_language_install.py new file mode 100644 index 00000000000..140cc4cc033 --- /dev/null +++ b/bin/addons/base/module/wizard/base_language_install.py @@ -0,0 +1,69 @@ +# -*- 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 tools +import pooler +from osv import osv, fields + +class base_language_install(osv.osv_memory): + """ Install Language""" + + _name = "base.language.install" + _description = "Install Language" + + _columns = { + 'lang': fields.selection(tools.scan_languages(),'Language'), + } + + def lang_install(self, cr, uid, ids, context): + language_obj = self.browse(cr, uid, ids)[0] + lang = language_obj.lang + if lang: + modobj = self.pool.get('ir.module.module') + mids = modobj.search(cr, uid, [('state', '=', 'installed')]) + modobj.update_translations(cr, uid, mids, lang) + + data_obj = self.pool.get('ir.model.data') + id2 = data_obj._get_id(cr, uid, 'base', 'view_base_language_install_msg') + if id2: + id2 = data_obj.browse(cr, uid, id2, context=context).res_id + + return { + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'base.module.import.msg', + 'views': [(id2, 'form')], + 'view_id': False, + 'type': 'ir.actions.act_window', + 'target': 'new', + } + +base_language_install() + +class base_language_install_msg(osv.osv_memory): + """ Install Language""" + + _name = "base.language.install.msg" + _description = "Install Language" + +base_language_install_msg() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/bin/addons/base/module/wizard/base_language_install_view.xml b/bin/addons/base/module/wizard/base_language_install_view.xml new file mode 100644 index 00000000000..3bec1c19005 --- /dev/null +++ b/bin/addons/base/module/wizard/base_language_install_view.xml @@ -0,0 +1,66 @@ + + + + + + Install Language + base.language.install + form + +
+ + + +