diff --git a/addons/web/__init__.py b/addons/web/__init__.py index b94c28cda7a..e01969ddcca 100644 --- a/addons/web/__init__.py +++ b/addons/web/__init__.py @@ -1,6 +1,5 @@ import http import controllers import cli -from . import ir_module wsgi_postload = http.wsgi_postload diff --git a/addons/web/http.py b/addons/web/http.py index 70df7b48051..508cd0451c5 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -480,7 +480,7 @@ class Root(object): self.addons = {} self.statics = {} - self._load_addons() + self.load_addons() # Setup http sessions path = session_path() @@ -493,7 +493,7 @@ class Root(object): """ return self.dispatch(environ, start_response) - def _dispatch(self, environ, start_response): + def dispatch(self, environ, start_response): """ Performs the actual WSGI dispatching for the application, may be wrapped during the initialization of the object. @@ -529,11 +529,9 @@ class Root(object): return response(environ, start_response) - def _load_addons(self): - """ - Loads all addons at the specified addons path, returns a mapping of - static URLs to the corresponding directories - """ + def load_addons(self): + """ Load all addons from addons patch containg static files and + controllers and configure them. """ for addons_path in openerp.modules.module.ad_paths: for module in os.listdir(addons_path): @@ -559,7 +557,7 @@ class Root(object): if hasattr(o, '_cp_path'): controllers_path[o._cp_path] = o - app = werkzeug.wsgi.SharedDataMiddleware(self._dispatch, self.statics) + app = werkzeug.wsgi.SharedDataMiddleware(self.dispatch, self.statics) self.dispatch = DisableCacheMiddleware(app) def find_handler(self, *l): diff --git a/addons/web/ir_module.py b/addons/web/ir_module.py deleted file mode 100644 index c4588b19aa6..00000000000 --- a/addons/web/ir_module.py +++ /dev/null @@ -1,17 +0,0 @@ -from openerp.osv import osv -import openerp.service.wsgi_server as oewsgi - -from .http import Root - -class ir_module(osv.Model): - _inherit = 'ir.module.module' - - def update_list(self, cr, uid, context=None): - result = super(ir_module, self).update_list(cr, uid, context=context) - - if tuple(result) != (0, 0): - for handler in oewsgi.module_handlers: - if isinstance(handler, Root): - handler._load_addons() - - return result diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index b73fe577923..a2ff00c5f03 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1326,7 +1326,7 @@ instance.web.EmbeddedClient = instance.web.Client.extend({ _template: 'EmbedClient', init: function(parent, origin, dbname, login, key, action_id, options) { this._super(parent, origin); - this.bind(dbname, login, key); + this.bind_credentials(dbname, login, key); this.action_id = action_id; this.options = options || {}; }, @@ -1365,7 +1365,7 @@ instance.web.EmbeddedClient = instance.web.Client.extend({ return instance.session.session_authenticate(this.dbname, this.login, this.key, true); }, - bind: function(dbname, login, key) { + bind_credentials: function(dbname, login, key) { this.dbname = dbname; this.login = login; this.key = key;