[FIX] Don't show timezone warning if user anonymous, also fixed click event handler on login

bzr revid: vta@openerp.com-20121217094827-digf2qlawxbjfo09
This commit is contained in:
vta vta@openerp.com 2012-12-17 10:48:27 +01:00
parent 13514c5985
commit b5648aa982
1 changed files with 10 additions and 1 deletions

View File

@ -26,7 +26,7 @@ openerp.portal_anonymous = function(instance) {
start: function() {
var self = this;
this._super.apply(this, arguments);
this.$el.find('.oe_topbar_anonymous_login').click(function() {
this.$el.click(function() {
var p = self.getParent();
var am = p.action_manager;
p.$el.find('.oe_leftbar').hide();
@ -44,4 +44,13 @@ openerp.portal_anonymous = function(instance) {
}
});
instance.web.WebClient.include({
check_timezone: function() {
if (this.session.username !== 'anonymous') {
return this._super.apply(this, arguments);
}
return false;
},
});
};