diff options
| author | ced <> | 2007-04-21 13:32:18 +0000 |
|---|---|---|
| committer | ced <> | 2007-04-21 13:32:18 +0000 |
| commit | 2302e4492c84cff84e4e7731deebfe3330a1f194 (patch) | |
| tree | 80a5309fb928f10d8c38fe88e1deddd56b957b3b /bin/addons/base/module/wizard/wizard_update_module.py | |
| parent | d4d0e528ac7104e21eca7e9087c5e40dc6b37ecf (diff) | |
KERNEL,BASE: allow to create zip modules
bzr revid: ced-4e79fd05ccde4df82f91dece060db6fd1b0e46a3
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_update_module.py')
| -rw-r--r-- | bin/addons/base/module/wizard/wizard_update_module.py | 22 |
1 files changed, 17 insertions, 5 deletions
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 = '''<?xml version="1.0"?> +<form string="Scan for new modules"> + <label string="This function will check for new modules in the 'addons' path and on module repository." colspan="4" /> +</form> + ''' + 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'} }, |
