summaryrefslogtreecommitdiff
path: root/bin/addons/base/module/wizard/wizard_module_import.py
diff options
context:
space:
mode:
authorced <>2007-07-30 13:35:27 +0000
committerced <>2007-07-30 13:35:27 +0000
commit792fc3cf97ad04602ac4d8e299c216a19cda7bf0 (patch)
tree6e92decdc2690ae0024317fd3b7c1b9e8363bfca /bin/addons/base/module/wizard/wizard_module_import.py
parent5d123a10f5513c98d2a1f77ead01fbda2ec1097e (diff)
base,kernel,base_module_publish: improve publication of module, add repository, etc...
- add repository for module - improve version number - add check to remove module - can not upload module with the same version number - add version compare from portage (gentoo) - add release in context of eval - add active = True to base module - add wizard to update all installed modules - add check to not upload module that is not installed - add posibility to include source - fix license - now load zip module in preference bzr revid: ced-e1b031d238126e8060b0e2cb6f87bb93cca5a343
Diffstat (limited to 'bin/addons/base/module/wizard/wizard_module_import.py')
-rw-r--r--bin/addons/base/module/wizard/wizard_module_import.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/bin/addons/base/module/wizard/wizard_module_import.py b/bin/addons/base/module/wizard/wizard_module_import.py
index 0731de4030c..910f92041dc 100644
--- a/bin/addons/base/module/wizard/wizard_module_import.py
+++ b/bin/addons/base/module/wizard/wizard_module_import.py
@@ -67,9 +67,6 @@ class move_module_wizard(wizard.interface):
ad = tools.config['addons_path']
- if os.path.isdir(os.path.join(ad,module_name)) or os.path.isfile(os.path.join(ad,module_name+'.zip')):
- raise wizard.except_wizard('Error !', 'This module already exist in your system !')
-
fname = os.path.join(ad,module_name+'.zip')
try:
fp = file(fname, 'wb')
@@ -78,7 +75,19 @@ class move_module_wizard(wizard.interface):
except IOError, e:
raise wizard.except_wizard('Error !', 'Can not create the module file:\n'+' '+fname+'!')
- return {}
+ pooler.get_pool(cr.dbname).get('ir.module.module').update_list(cr, uid)
+ return {'module_name': module_name}
+
+ def _action_module_open(self, cr, uid, data, context):
+ return {
+ 'domain': str([('name', '=', data['form']['module_name'])]),
+ 'name': 'Module List',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'ir.module.module',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window'
+ }
states = {
'init': {
@@ -96,8 +105,12 @@ class move_module_wizard(wizard.interface):
'type':'form',
'arch':finish_form,
'fields':{},
- 'state':[('end','Close')]
+ 'state':[('open_window','Close')]
}
- }
+ },
+ 'open_window': {
+ 'actions': [],
+ 'result': {'type': 'action', 'action': _action_module_open, 'state':'end'}
+ },
}
move_module_wizard('base.module.import')