[FIX] configuration wizard menu

bzr revid: hmo@tinyerp.com-20100710072342-y1lfoozx9vbco6p6
This commit is contained in:
Harry (OpenERP) 2010-07-10 12:53:42 +05:30
parent 3f51665a28
commit dd99061d57
4 changed files with 50 additions and 9 deletions

View File

@ -1489,18 +1489,13 @@
</record>
<menuitem id="next_id_11" name="Configuration Wizards" parent="base.menu_config" sequence="1"/>
<wizard id="wizard_configuration" model="ir.module.module" name="module.configuration" string="Start Configuration"/>
<menuitem action="act_ir_actions_todo_form" id="menu_ir_actions_todo_form"
parent="next_id_11" groups="base.group_extended" sequence="20"/>
<record id="action_start_configurator" model="ir.actions.server">
<field name="name">Launch Configuration Wizards</field>
<field name="model_id" ref="model_res_config"/>
<field name="state">code</field>
<field name="code">action = self.start(cr, uid, [])</field>
</record>
<menuitem
action="action_start_configurator" name="Start Configuration"
action="wizard_configuration" name="Start Configuration"
id="menu_configurator_module" parent="next_id_11"
type="server"/>
type="wizard"/>
</data>
</openerp>

View File

@ -14,6 +14,9 @@
<menuitem action="wizard_update" icon="STOCK_CONVERT" id="menu_module_update" parent="menu_management" type="wizard"/>
<wizard id="wizard_upgrade" model="ir.module.module" name="module.upgrade" string="Apply Scheduled Upgrades"/>
<menuitem action="wizard_upgrade" id="menu_wizard_upgrade" parent="menu_management" type="wizard"/>
<record id="wizard_lang_install" model="ir.actions.wizard">

View File

@ -21,6 +21,7 @@
import wizard_update_module
import wizard_module_upgrade
import wizard_configuration
import wizard_module_lang_install
import add_new
import wizard_export_lang

View File

@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import pooler
class wizard_configuration(wizard.interface):
def _config(self, cr, uid, data, context=None):
return pooler.get_pool(cr.dbname).get('res.config')\
.next(cr, uid, [], context=context)
states = {
'init':{
'result': {
'type': 'action',
'action': _config,
'state': 'end',
},
}
}
wizard_configuration('module.configuration')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: