From 59d1f3dc4e3e574d14663db4f9a5f893f3b6c423 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 26 Jul 2011 17:04:03 +0200 Subject: [PATCH] [FIX] fetching of the user's home action when not logge in bzr revid: xmo@openerp.com-20110726150403-cwmw2a14g8gzjwbk --- addons/base/static/src/js/chrome.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/base/static/src/js/chrome.js b/addons/base/static/src/js/chrome.js index 0068d58cee7..aa8fd111549 100644 --- a/addons/base/static/src/js/chrome.js +++ b/addons/base/static/src/js/chrome.js @@ -920,18 +920,20 @@ openerp.base.WebClient = openerp.base.Controller.extend({ load_url_state: function () { var self = this; // TODO: add actual loading if there is url state to unpack, test on window.location.hash + + // not logged in + if (!this.session.uid) { return; } var ds = new openerp.base.DataSetSearch(this, 'res.users'); - ds.read_ids([parseInt(this.session.uid, 10)], ['action_id'], function (users) { + ds.read_ids([this.session.uid], ['action_id'], function (users) { var home_action = users[0].action_id; if (!home_action) { self.default_home(); return; } - // oh dear self.execute_home_action(home_action[0], ds); }) }, - default_home: function () { console.log('base default home') }, + default_home: function () { }, /** * Bundles the execution of the home action *