diff --git a/bin/addons/base/__openerp__.py b/bin/addons/base/__openerp__.py
index 2592ed1bf00..5f7fade6309 100644
--- a/bin/addons/base/__openerp__.py
+++ b/bin/addons/base/__openerp__.py
@@ -43,7 +43,6 @@
'ir/wizard/wizard_menu_view.xml',
'ir/ir.xml',
'ir/workflow/workflow_view.xml',
- 'module/module_wizard.xml',
'module/module_view.xml',
'module/module_web_view.xml',
'module/module_data.xml',
@@ -51,6 +50,11 @@
'module/wizard/base_module_import_view.xml',
'module/wizard/base_module_update_view.xml',
'module/wizard/base_language_install_view.xml',
+ 'module/wizard/base_import_language_view.xml',
+ 'module/wizard/base_module_upgrade_view.xml',
+ #TODO: 'module/wizard/base_module_configuration_view.xml',
+ 'module/wizard/base_export_language_view.xml',
+ 'module/wizard/base_update_translations_view.xml',
'res/res_request_view.xml',
'res/res_lang_view.xml',
'res/res_log_view.xml',
diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml
index 44014751b20..7639418f825 100644
--- a/bin/addons/base/base_update.xml
+++ b/bin/addons/base/base_update.xml
@@ -303,7 +303,7 @@
- Choose between the simplified interface and the extended one. We suggest simplified interface. It has less options and fields but is easier to start with OpenERP. You will be able to switch to the extended interface later.
+ We suggest simplified interface, It has less options and fields but is easier to start with OpenERP. You will be able to switch to the extended interface later from your user preferences.
Choose Your Interface
diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml
index ff399994841..eac674f3e77 100644
--- a/bin/addons/base/ir/ir.xml
+++ b/bin/addons/base/ir/ir.xml
@@ -23,7 +23,7 @@
-
+
ir.values.tree.action
ir.values
@@ -37,7 +37,7 @@
-
+
ir.values.search.action
ir.values
@@ -50,7 +50,7 @@
-
+
Client Actions
ir.actions.act_window
@@ -61,14 +61,14 @@
[('key','=','action')]
{'read':'default','default_object':1}
-
+
tree
-
+
form
@@ -352,7 +352,7 @@
-
+
@@ -627,7 +627,7 @@
-
+
Window Actions
ir.actions.act_window
@@ -680,7 +680,7 @@
-
+
ir.actions.wizard.search
ir.actions.wizard
@@ -693,7 +693,7 @@
-
+
Wizards
ir.actions.act_window
@@ -829,7 +829,7 @@
-
+
Roles Structure
ir.actions.act_window
@@ -1289,7 +1289,7 @@
-
+
ir.model.data.form
ir.model.data
@@ -1501,7 +1501,7 @@
-
+
-
+
-
+
Access Controls List
ir.model.access
@@ -1858,7 +1858,7 @@
-
+
ir.actions.server.search
ir.actions.server
@@ -1909,7 +1909,7 @@
@@ -1969,5 +1969,6 @@
action="wizard_configuration" name="Start Configuration"
id="menu_configurator_module" parent="next_id_11"
type="wizard"/>
+
diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml
deleted file mode 100644
index 341547c96a4..00000000000
--- a/bin/addons/base/module/module_wizard.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
- Export a Translation File
- wizard.module.lang.export
- form
-
-
-
-
-
-
- Export a Translation File
- ir.actions.act_window
- wizard.module.lang.export
- form
- form
- new
-
-
-
-
- Import a Translation File
- module.lang.import
-
-
-
-
- Update Translations
- wizard.module.update_translations
- form
-
-
-
-
-
- Resynchronise Terms
- ir.actions.act_window
- wizard.module.update_translations
- form
- form
- new
-
-
-
-
-
diff --git a/bin/addons/base/module/wizard/__init__.py b/bin/addons/base/module/wizard/__init__.py
index e43bbbdca07..76e7b329331 100644
--- a/bin/addons/base/module/wizard/__init__.py
+++ b/bin/addons/base/module/wizard/__init__.py
@@ -19,16 +19,17 @@
#
##############################################################################
-import wizard_module_upgrade
+#Old Wizard
import wizard_configuration
-import add_new
-import wizard_export_lang
-import wizard_import_lang
-import wizard_update_translations
import base_module_import
import base_module_update
import base_language_install
+import base_import_language
+import base_module_upgrade
+import base_module_configuration
+import base_export_language
+import base_update_translations
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/base_export_language.py
similarity index 95%
rename from bin/addons/base/module/wizard/wizard_export_lang.py
rename to bin/addons/base/module/wizard/base_export_language.py
index b59351be61b..ca2e3059cfb 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/base_export_language.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
+# Copyright (C) 2004-2010 Tiny SPRL ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -27,7 +27,7 @@ from osv import fields,osv
from tools.translate import _
from tools.misc import get_iso_codes
-class wizard_export_lang(osv.osv_memory):
+class base_language_export(osv.osv_memory):
def _get_languages(self, cr, uid, context):
lang_obj=pooler.get_pool(cr.dbname).get('res.lang')
@@ -67,7 +67,7 @@ class wizard_export_lang(osv.osv_memory):
buf.close()
return self.write(cr, uid, ids, {'state':'get', 'data':out, 'advice':this.advice, 'name':this.name}, context=context)
- _name = "wizard.module.lang.export"
+ _name = "base.language.export"
_columns = {
'name': fields.char('Filename', 16, readonly=True),
'lang': fields.selection(_get_languages, 'Language', help='To export a new language, do not select a language.'), # not required: unset = new language
@@ -82,7 +82,7 @@ class wizard_export_lang(osv.osv_memory):
_defaults = { 'state': lambda *a: 'choose',
'name': lambda *a: 'lang.tar.gz'
}
-wizard_export_lang()
+base_language_export()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/module/wizard/base_export_language_view.xml b/bin/addons/base/module/wizard/base_export_language_view.xml
new file mode 100644
index 00000000000..389a97d0954
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_export_language_view.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+ Export a Translation File
+ base.language.export
+ form
+
+
+
+
+
+
+ Export a Translation File
+ ir.actions.act_window
+ base.language.export
+ form
+ form
+ new
+
+
+
+
diff --git a/bin/addons/base/module/wizard/base_import_language.py b/bin/addons/base/module/wizard/base_import_language.py
new file mode 100644
index 00000000000..ca45c0a6c1c
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_import_language.py
@@ -0,0 +1,63 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+import base64
+import pooler
+from tempfile import TemporaryFile
+from osv import osv, fields
+
+class base_language_import(osv.osv_memory):
+ """ Language Import """
+
+ _name = "base.language.import"
+ _description = "Language Import"
+
+ _columns = {
+ 'name': fields.char('Language Name',size=64 , required=True),
+ 'code': fields.char('Code (eg:en__US)',size=5 , required=True),
+ 'data': fields.binary('File', required=True),
+ }
+
+ def import_lang(self, cr, uid, ids, context):
+ """
+ Import Language
+ @param cr: the current row, from the database cursor.
+ @param uid: the current user’s ID for security checks.
+ @param ids: the ID or list of IDs
+ @param context: A standard dictionary
+ """
+
+ import_data = self.browse(cr, uid, ids)[0]
+ fileobj = TemporaryFile('w+')
+ fileobj.write(base64.decodestring(import_data.data))
+
+ # now we determine the file format
+ fileobj.seek(0)
+ first_line = fileobj.readline().strip().replace('"', '').replace(' ', '')
+ fileformat = first_line.endswith("type,name,res_id,src,value") and 'csv' or 'po'
+ fileobj.seek(0)
+
+ tools.trans_load_data(cr.dbname, fileobj, fileformat, import_data.code, lang_name=import_data.name)
+ fileobj.close()
+ return {}
+
+base_language_import()
\ No newline at end of file
diff --git a/bin/addons/base/module/wizard/base_import_language_view.xml b/bin/addons/base/module/wizard/base_import_language_view.xml
new file mode 100644
index 00000000000..031969543f7
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_import_language_view.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+ Import Language
+ base.language.import
+ form
+
+
+
+
+
+
+ Import Language
+ ir.actions.act_window
+ base.language.import
+ form
+ form
+ new
+
+
+
+
+
+
diff --git a/bin/addons/base/module/wizard/base_module_configuration.py b/bin/addons/base/module/wizard/base_module_configuration.py
new file mode 100644
index 00000000000..2473136501d
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_configuration.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import pooler
+from osv import osv, fields
+
+class base_module_configuration(osv.osv_memory):
+
+ _name = "base.module.configuration"
+
+ def config(self, cr, uid, data, context=None):
+ return self.pool.get('res.config').next(cr, uid, [], context=context)
+
+base_module_configuration()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/bin/addons/base/module/wizard/base_module_configuration_view.xml b/bin/addons/base/module/wizard/base_module_configuration_view.xml
new file mode 100644
index 00000000000..05190133801
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_configuration_view.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+ Module Configuration
+ base.module.configuration
+ form
+
+
+
+
+
+
+ Module Configuration
+ ir.actions.act_window
+ base.module.configuration
+ form
+ form
+ new
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/bin/addons/base/module/wizard/add_new.py b/bin/addons/base/module/wizard/base_module_scan.py
similarity index 70%
rename from bin/addons/base/module/wizard/add_new.py
rename to bin/addons/base/module/wizard/base_module_scan.py
index c6eddab2adb..cd8d4ab7ec5 100644
--- a/bin/addons/base/module/wizard/add_new.py
+++ b/bin/addons/base/module/wizard/base_module_scan.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
-# Copyright (C) 2010 OpenERP s.a. ().
+# Copyright (C) 2004-2010 Tiny SPRL ().
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -16,10 +15,9 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
-
import os
import re
import glob
@@ -27,23 +25,19 @@ import time
import imp
import tools
-import wizard
import pooler
import zipfile
+from osv import osv, fields
-module_name_re = re.compile('.*addons.(.*?).__terp__.py$')
+class base_module_scan(osv.osv_memory):
+ """ scan module """
-_info_arch = '''
-
-'''
-_info_fields = {}
+ _name = "base.module.scan"
+ _description = "scan module"
-class wizard_install_module(wizard.interface):
- def watch_dir(self, cr, uid, data, context):
- mod_obj = pooler.get_pool(cr.dbname).get('ir.module.module')
+ def watch_dir(self, cr, uid, ids, context):
+ mod_obj = self.pool.get('ir.module.module')
all_mods = mod_obj.read(cr, uid, mod_obj.search(cr, uid, []), ['name', 'state'])
known_modules = [x['name'] for x in all_mods]
ls_ad = glob.glob(os.path.join(tools.config['addons_path'], '*', '__terp__.py'))
@@ -79,18 +73,4 @@ class wizard_install_module(wizard.interface):
mod_obj.write(cr, uid, [mod['id']], {'state': 'uninstalled'})
return {}
- states = {
- 'init': {
- 'actions': [],
- 'result': {'type':'form', 'arch': _info_arch, 'fields': _info_fields, 'state':[('end','Cancel','gtk-cancel'),('addmod','Check new modules','gtk-ok')]}
- },
- 'addmod': {
- 'actions': [watch_dir],
- 'result': {'type':'state', 'state':'end'}
- },
- }
-wizard_install_module('module.module.scan')
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
+base_module_scan()
\ No newline at end of file
diff --git a/bin/addons/base/module/wizard/base_module_scan_view.xml b/bin/addons/base/module/wizard/base_module_scan_view.xml
new file mode 100644
index 00000000000..a039c3122e1
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_scan_view.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+ Module Scan
+ base.module.scan
+ form
+
+
+
+
+
+
+ Module Scan
+ ir.actions.act_window
+ base.module.scan
+ form
+ form
+ new
+
+
+
+
+
diff --git a/bin/addons/base/module/wizard/base_module_upgrade.py b/bin/addons/base/module/wizard/base_module_upgrade.py
new file mode 100644
index 00000000000..fe85cb0422c
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_upgrade.py
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import pooler
+import os
+import tools
+from osv import osv, fields
+
+class base_module_upgrade(osv.osv_memory):
+ """ Module Upgrade """
+
+ _name = "base.module.upgrade"
+ _description = "Module Upgrade"
+
+ _columns = {
+ 'module_info': fields.text('Modules to update',readonly=True),
+ }
+
+ def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+ """ Changes the view dynamically
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param context: A standard dictionary
+ @return: New arch of view.
+ """
+ res = super(base_module_upgrade, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
+ record_id = context and context.get('active_id', False) or False
+ active_model = context.get('active_model')
+ if (not record_id) or (not active_model):
+ return res
+
+ ids = self.get_module_list(cr, uid, context=context)
+ if not ids:
+ res['arch'] = ''''''
+
+ return res
+
+ def get_module_list(self, cr, uid, context=None):
+ mod_obj = self.pool.get('ir.module.module')
+ ids = mod_obj.search(cr, uid, [
+ ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
+ return ids
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+ """
+ mod_obj = self.pool.get('ir.module.module')
+ ids = self.get_module_list(cr, uid, context=context)
+ res = mod_obj.read(cr, uid, ids, ['name','state'], context)
+ return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res))}
+
+ def upgrade_module(self, cr, uid, ids, context):
+ pool = pooler.get_pool(cr.dbname)
+ mod_obj = self.pool.get('ir.module.module')
+ data_obj = self.pool.get('ir.model.data')
+ ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])])
+ unmet_packages = []
+ mod_dep_obj = pool.get('ir.module.module.dependency')
+ for mod in mod_obj.browse(cr, uid, ids):
+ depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
+ for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
+ if dep_mod.state in ('unknown','uninstalled'):
+ unmet_packages.append(dep_mod.name)
+ if len(unmet_packages):
+ raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
+ mod_obj.download(cr, uid, ids, context=context)
+ cr.commit()
+ db, pool = pooler.restart_pool(cr.dbname, update_module=True)
+
+ id2 = data_obj._get_id(cr, uid, 'base', 'view_base_module_upgrade_install')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'base.module.upgrade',
+ 'views': [(id2, 'form')],
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+
+ def config(self, cr, uid, ids, context=None):
+ return self.pool.get('res.config').next(cr, uid, [], context=context)
+
+base_module_upgrade()
diff --git a/bin/addons/base/module/wizard/base_module_upgrade_view.xml b/bin/addons/base/module/wizard/base_module_upgrade_view.xml
new file mode 100644
index 00000000000..a01146c0d37
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_module_upgrade_view.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ Module Upgrade
+ base.module.upgrade
+ form
+
+
+
+
+
+
+ Module Upgrade
+ ir.actions.act_window
+ base.module.upgrade
+ form
+ form
+ new
+
+
+
+
+
+
+
+ Module Upgrade Install
+ base.module.upgrade
+ form
+
+
+
+
+
+
+ Module Upgrade Install
+ ir.actions.act_window
+ base.module.upgrade
+ form
+ form
+
+ new
+
+
+
+
\ No newline at end of file
diff --git a/bin/addons/base/module/wizard/wizard_update_translations.py b/bin/addons/base/module/wizard/base_update_translations.py
similarity index 94%
rename from bin/addons/base/module/wizard/wizard_update_translations.py
rename to bin/addons/base/module/wizard/base_update_translations.py
index 85914ff0164..7e61c0a2431 100644
--- a/bin/addons/base/module/wizard/wizard_update_translations.py
+++ b/bin/addons/base/module/wizard/base_update_translations.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -24,13 +24,13 @@ import tools
import pooler
import cStringIO
-class update_translations(osv.osv_memory):
+class base_update_translations(osv.osv_memory):
def _get_languages(self, cr, uid, context):
lang_obj=pooler.get_pool(cr.dbname).get('res.lang')
ids=lang_obj.search(cr, uid, ['&', ('active', '=', True), ('translatable', '=', True),])
langs=lang_obj.browse(cr, uid, ids)
return [(lang.code, lang.name) for lang in langs]
-
+
def _get_lang_name(self, cr, uid, lang_code):
lang_obj=pooler.get_pool(cr.dbname).get('res.lang')
ids=lang_obj.search(cr, uid, [('code', '=', lang_code)])
@@ -50,9 +50,9 @@ class update_translations(osv.osv_memory):
buf.close()
return {'type': 'ir.actions.act_window_close'}
- _name = 'wizard.module.update_translations'
+ _name = 'base.update.translations'
_columns = {
'lang': fields.selection(_get_languages, 'Language', required=True),
}
-update_translations()
+base_update_translations()
diff --git a/bin/addons/base/module/wizard/base_update_translations_view.xml b/bin/addons/base/module/wizard/base_update_translations_view.xml
new file mode 100644
index 00000000000..9663406c030
--- /dev/null
+++ b/bin/addons/base/module/wizard/base_update_translations_view.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ Update Translations
+ base.update.translations
+ form
+
+
+
+
+
+ Resynchronise Terms
+ ir.actions.act_window
+ base.update.translations
+ form
+ form
+ new
+
+
+
+
+
diff --git a/bin/addons/base/module/wizard/wizard_import_lang.py b/bin/addons/base/module/wizard/wizard_import_lang.py
deleted file mode 100644
index 80f8048653f..00000000000
--- a/bin/addons/base/module/wizard/wizard_import_lang.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import wizard
-import tools
-import base64
-import pooler
-from tempfile import TemporaryFile
-
-view_form="""
-"""
-
-fields_form={
- 'name':{'string':'Language name', 'type':'char', 'size':64, 'required':True},
- 'code':{'string':'Code (eg:en__US)', 'type':'char', 'size':5, 'required':True},
- 'data':{'string':'File', 'type':'binary', 'required':True},
-}
-
-class wizard_import_lang(wizard.interface):
-
- def _import_lang(self, cr, uid, data, context):
- form=data['form']
- fileobj = TemporaryFile('w+')
- fileobj.write( base64.decodestring(form['data']) )
-
- # now we determine the file format
- fileobj.seek(0)
- first_line = fileobj.readline().strip().replace('"', '').replace(' ', '')
- fileformat = first_line.endswith("type,name,res_id,src,value") and 'csv' or 'po'
- fileobj.seek(0)
-
- tools.trans_load_data(cr.dbname, fileobj, fileformat, form['code'], lang_name=form['name'])
- fileobj.close()
- return {}
-
- states={
- 'init':{
- 'actions': [],
- 'result': {'type': 'form', 'arch': view_form, 'fields': fields_form,
- 'state':[
- ('end', 'Close', 'gtk-cancel'),
- ('finish', 'Ok', 'gtk-ok', True)
- ]
- }
- },
- 'finish':{
- 'actions':[],
- 'result':{'type':'action', 'action':_import_lang, 'state':'end'}
- },
- }
-wizard_import_lang('module.lang.import')
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/bin/addons/base/module/wizard/wizard_module_upgrade.py b/bin/addons/base/module/wizard/wizard_module_upgrade.py
deleted file mode 100644
index 04be1c1428d..00000000000
--- a/bin/addons/base/module/wizard/wizard_module_upgrade.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2009 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import wizard
-import pooler
-import os
-import tools
-
-view_form_end = """
-"""
-
-view_form = """
-"""
-
-view_field = {
- "module_info": {'type': 'text', 'string': 'Modules to update', 'readonly': True},
-}
-
-class wizard_info_get(wizard.interface):
- def _get_install(self, cr, uid, data, context):
- pool=pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [
- ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- res = mod_obj.read(cr, uid, ids, ['name','state'], context)
- return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res))}
-
- def _check_upgrade_module(self,cr,uid,data,context):
- pool = pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [
- ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- if ids and len(ids):
- return 'next'
- else:
- return 'end'
-
- def _upgrade_module(self, cr, uid, data, context):
- pool = pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- unmet_packages = []
- mod_dep_obj = pool.get('ir.module.module.dependency')
- for mod in mod_obj.browse(cr, uid, ids):
- depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
- for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
- if dep_mod.state in ('unknown','uninstalled'):
- unmet_packages.append(dep_mod.name)
- if len(unmet_packages):
- raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages))
- mod_obj.download(cr, uid, ids, context=context)
- cr.commit()
- db, pool = pooler.restart_pool(cr.dbname, update_module=True)
- return {}
-
- def _config(self, cr, uid, data, context=None):
- return pooler.get_pool(cr.dbname).get('res.config')\
- .next(cr, uid, [], context=context)
-
- states = {
- 'init': {
- 'actions': [],
- 'result' : {'type': 'choice', 'next_state': _check_upgrade_module }
- },
- 'next': {
- 'actions': [_get_install],
- 'result': {'type':'form', 'arch':view_form, 'fields': view_field,
- 'state':[
- ('end', 'Cancel', 'gtk-cancel'),
- ('start', 'Start update', 'gtk-ok', True)
- ]
- }
- },
- 'start': {
- 'actions': [_upgrade_module],
- 'result': {'type':'form', 'arch':view_form_end, 'fields': {},
- 'state':[
- ('end', 'Close', 'gtk-close', True),
- ('config', 'Start configuration', 'gtk-ok', True)
- ]
- }
- },
- 'end': {
- 'actions': [],
- 'result': {'type':'form', 'arch':view_form_end, 'fields': {},
- 'state':[
- ('end', 'Close', 'gtk-close', True),
- ('config', 'Start configuration', 'gtk-ok', True)
- ]
- }
- },
- 'config':{
- 'result': {
- 'type': 'action',
- 'action': _config,
- 'state': 'end',
- },
- }
- }
-wizard_info_get('module.upgrade')
-
-
-class wizard_info_get_simple(wizard.interface):
- def _get_install(self, cr, uid, data, context):
- pool=pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [
- ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- res = mod_obj.read(cr, uid, ids, ['name','state'], context)
- return {'module_info': '\n'.join(map(lambda x: x['name']+' : '+x['state'], res)),}
-
- def _check_upgrade_module(self,cr,uid,data,context):
- pool = pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [
- ('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- if ids and len(ids):
- return 'next'
- else:
- return 'end'
-
- def _upgrade_module(self, cr, uid, data, context):
- pool = pooler.get_pool(cr.dbname)
- mod_obj = pool.get('ir.module.module')
- ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])])
- unmet_packages = []
- mod_dep_obj = pool.get('ir.module.module.dependency')
- for mod in mod_obj.browse(cr, uid, ids):
- depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)])
- for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids):
- if dep_mod.state in ('unknown','uninstalled'):
- unmet_packages.append(dep_mod.name)
- if len(unmet_packages):
- raise wizard.except_wizard('Unmet dependencies!', 'The following modules are not installed or unavailable. \n\n'+'\n'.join(unmet_packages))
- mod_obj.download(cr, uid, ids, context=context)
- cr.commit()
- db, pool = pooler.restart_pool(cr.dbname, update_module=True)
- return {}
-
- def _config(self, cr, uid, data, context=None):
- return pooler.get_pool(cr.dbname).get('res.config')\
- .next(cr, uid, [], context=context)
-
- states = {
- 'init': {
- 'actions': [],
- 'result' : {'type': 'choice', 'next_state': _check_upgrade_module }
- },
- 'next': {
- 'actions': [_get_install],
- 'result': {'type':'form', 'arch':view_form, 'fields': view_field,
- 'state':[
- ('end', 'Cancel', 'gtk-cancel'),
- ('start', 'Start update', 'gtk-ok', True)
- ]
- }
- },
- 'start': {
- 'actions': [_upgrade_module],
- 'result': {'type':'form', 'arch':view_form_end, 'fields': {},
- 'state':[
- ('end', 'Close', 'gtk-close', True),
- ('config', 'Start configuration', 'gtk-ok', True)
- ]
- }
- },
- 'end': {
- 'actions': [],
- 'result': {'type':'form', 'arch':view_form_end, 'fields': {},
- 'state':[
- ('end', 'Close', 'gtk-close', True),
- ('config', 'Start configuration', 'gtk-ok', True)
- ]
- }
- },
- 'config':{
- 'result': {
- 'type': 'action',
- 'action': _config,
- 'state': 'end',
- },
- }
- }
-wizard_info_get_simple('module.upgrade.simple')
-
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml b/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml
index fafdc33d72c..97c418d9f81 100644
--- a/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml
+++ b/bin/addons/base/res/partner/wizard/partner_sms_send_view.xml
@@ -14,13 +14,13 @@
-
+
-
+
@@ -32,7 +32,6 @@
view_mode="form"
target="new"
key2="client_action_multi"
- id="action_partner_sms_send"
- groups="base.group_extended"/>
+ id="action_partner_sms_send"/>
diff --git a/bin/addons/base/res/res_request_view.xml b/bin/addons/base/res/res_request_view.xml
index 5373949a4a0..6780c7adefd 100644
--- a/bin/addons/base/res/res_request_view.xml
+++ b/bin/addons/base/res/res_request_view.xml
@@ -88,6 +88,17 @@
+
+ res.request.calendar
+ res.request
+ calendar
+
+
+
+
+
+
+
Requests
ir.actions.act_window
diff --git a/bin/addons/base_quality_interrogation.py b/bin/addons/base_quality_interrogation.py
index 4e9c3321dfa..fe5bc27811b 100755
--- a/bin/addons/base_quality_interrogation.py
+++ b/bin/addons/base_quality_interrogation.py
@@ -88,7 +88,7 @@ def import_translate(uri, user, pwd, dbname, translate_in):
uid = login(uri, dbname, user, pwd)
if uid:
conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard')
- wiz_id = execute(conn,'create',dbname, uid, pwd, 'module.lang.import')
+ wiz_id = execute(conn,'create',dbname, uid, pwd, 'base.language.import')
for trans_in in translate_in:
lang,ext = os.path.splitext(trans_in.split('/')[-1])
state = 'init'