From 2302e4492c84cff84e4e7731deebfe3330a1f194 Mon Sep 17 00:00:00 2001 From: ced <> Date: Sat, 21 Apr 2007 13:32:18 +0000 Subject: KERNEL,BASE: allow to create zip modules bzr revid: ced-4e79fd05ccde4df82f91dece060db6fd1b0e46a3 --- .../base/module/wizard/wizard_update_module.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'bin/addons/base/module/wizard/wizard_update_module.py') diff --git a/bin/addons/base/module/wizard/wizard_update_module.py b/bin/addons/base/module/wizard/wizard_update_module.py index 5a2ec58912b..996815584a1 100644 --- a/bin/addons/base/module/wizard/wizard_update_module.py +++ b/bin/addons/base/module/wizard/wizard_update_module.py @@ -29,26 +29,38 @@ import wizard import netsvc +import pooler class wizard_update_module(wizard.interface): + + arch = ''' +
+ ''' + fields = {} + def _update_module(self, cr, uid, data, context): - service = netsvc.LocalService("object_proxy") - service.execute(cr.dbname, uid, 'ir.module.module', 'update_list') + pooler.get_pool(cr.dbname).get('ir.module.module').update_list(cr, uid) return {} def _action_module_open(self, cr, uid, data, context): return { 'domain': "[]", 'name': 'Open Module List', - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'ir.module.module', + 'view_type': 'tree', + 'res_model': 'ir.module.category', + 'domain': "[('parent_id', '=', False)]", 'view_id': False, 'type': 'ir.actions.act_window' } states = { 'init': { + 'actions': [], + 'result': {'type': 'form', 'arch': arch, 'fields': fields, 'state': [('end', 'Cancel', 'gtk-cancel'), ('update', 'Check new modules', 'gtk-ok')]} + }, + 'update': { 'actions': [_update_module], 'result': {'type':'state', 'state':'open_window'} }, -- cgit v1.2.3