diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 72d6bcffe6f..581a141addd 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -638,6 +638,9 @@ class Home(http.Controller): def web_login(self, redirect=None, **kw): ensure_db() + if not request.uid: + request.uid = openerp.SUPERUSER_ID + values = request.params.copy() if not redirect: redirect = '/web?' + request.httprequest.query_string diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 461bfefac1a..9b87d416206 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -513,7 +513,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ var fields = $(form).serializeArray(); self.rpc("/web/database/create", {'fields': fields}).done(function(result) { if (result) { - instance.web.redirect('/web') + instance.web.redirect('/web'); } else { alert("Failed to create database"); } @@ -1488,24 +1488,6 @@ instance.web.embed = function (origin, dbname, login, key, action, options) { client.insertAfter(currentScript); }; -openerp.web.LoginForm = openerp.web.Widget.extend({ - init: function ($form) { - this._super(/* no parent */); - this.setElement($form); - this.$el.on('submit', this.on_submit); - this.start(); - }, - start: function () { - if (location.hash) { - this.$el.attr('action', this.$el.attr('action') + location.hash); - } - return this._super(); - }, - on_submit: function () { - return true; - }, -}); - })(); // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: diff --git a/addons/web/views/database_selector.html b/addons/web/views/database_selector.html index b8f774945e4..8164ddb9498 100644 --- a/addons/web/views/database_selector.html +++ b/addons/web/views/database_selector.html @@ -38,11 +38,14 @@ {% endif %} -