From 1a5bfdc0559a5f4858143165cf2cd8ddd4b80222 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 24 Oct 2014 11:33:15 +0200 Subject: [PATCH] [FIX] website_mail: connected users can't follow a website document --- addons/website_mail/static/src/js/follow.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website_mail/static/src/js/follow.js b/addons/website_mail/static/src/js/follow.js index a8b351efa6c..54b64c949cf 100644 --- a/addons/website_mail/static/src/js/follow.js +++ b/addons/website_mail/static/src/js/follow.js @@ -41,7 +41,7 @@ this.$target.removeClass('has-error'); var email = $email.length ? $email.val() : false; - if (email) { + if (email || this.is_user) { openerp.jsonRpc('/website_mail/follow', 'call', { 'id': +this.$target.data('id'), 'object': this.$target.data('object'), @@ -53,7 +53,6 @@ } }, toggle_subscription: function(follow, email) { - console.log(follow, email); follow = follow || (!email && this.$target.attr('data-unsubscribe')); if (follow) { this.$target.find(".js_follow_btn").addClass("hidden");