diff options
| author | Harshad Modi <hmo@tinyerp.com> | 2008-06-20 13:20:21 +0000 |
|---|---|---|
| committer | Harshad Modi <hmo@tinyerp.com> | 2008-06-20 13:20:21 +0000 |
| commit | cbcaddc5e3b15767e2a6d392c0be0165fe08a2d5 (patch) | |
| tree | 0e8c09da0b2711a9d9afc9012f65112e825f4f0f /bin/addons/base/module/wizard/wizard_module_upgrade.py | |
| parent | ce326ff2e51b3cab2fefec057c12e76c0d28e413 (diff) | |
fix bugs on module upgrade :
* revert my change on this wizard, it's buggy code
bzr revid: hmo@tinyerp.com-2a1665726de10a02212dc12345756214914fc7c7
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_module_upgrade.py')
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_module_upgrade.py | 62 |
1 files changed, 9 insertions, 53 deletions
diff --git a/bin/addons/base/module/wizard/wizard_module_upgrade.py b/bin/addons/base/module/wizard/wizard_module_upgrade.py index abe9d354bc1..683b9eff322 100644 --- a/bin/addons/base/module/wizard/wizard_module_upgrade.py +++ b/bin/addons/base/module/wizard/wizard_module_upgrade.py @@ -31,7 +31,6 @@ import wizard import pooler - view_form_end = """<?xml version="1.0"?> <form string="System upgrade done"> <separator string="System upgrade done"/> @@ -60,8 +59,6 @@ view_field = { 'readonly': True}, } - - class wizard_info_get(wizard.interface): def _get_install(self, cr, uid, data, context): pool=pooler.get_pool(cr.dbname) @@ -84,16 +81,9 @@ class wizard_info_get(wizard.interface): db, pool = pooler.restart_pool(cr.dbname, update_module=True) return {} - def _config(self, cr, uid, data, context=None): - return { - 'view_type': 'form', - 'res_model': 'ir.module.module.configuration.wizard', - 'type': 'ir.actions.act_window', - } - states = { 'init': { - 'actions': [_get_install], + 'actions': [_get_install], 'result': {'type':'form', 'arch':view_form, 'fields': view_field, 'state':[ ('end', 'Cancel', 'gtk-cancel'), @@ -102,47 +92,13 @@ class wizard_info_get(wizard.interface): } }, 'start': { - 'actions': [_upgrade_module], - 'result': { - 'type': 'form', - 'object': 'ir.module.module.install_upgrade.start', - 'state': [ - ('config', 'Ok', 'tryton-ok', True), - ], - }, - }, - 'config': { - 'result': { - 'type': 'action', - 'action': _config, - 'state': 'end', - }, - }, - } - + 'actions': [_upgrade_module], + 'result': {'type':'form', 'arch':view_form_end, 'fields': {}, + 'state':[ + ('end', 'Close', 'gtk-close', True) + ] + } + }, + } wizard_info_get('module.upgrade') -class module_config(wizard.interface): - def _action_open(self, cr, uid, datas, context=None): - pool=pooler.get_pool(cr.dbname) - model_data_obj = pool.get('ir.model.data') - act_window_obj = pool.get('ir.actions.act_window') - model_data_ids = model_data_obj.search(cr, uid, [ - ('name', '=', 'open_module_tree'), - ('module', '=', 'base'), - ], limit=1, context=context) - model_data = model_data_obj.browse(cr, uid, model_data_ids[0], - context=context) - res = act_window_obj.read(cr, uid, model_data.res_id, context=context) - return res - states = { - 'init': { - 'result': { - 'type': 'action', - 'action': _action_open, - 'state': 'end', - }, - }, - } - -module_config('ir.module.module.config') |
