[FIX] website_mail: connected users can't follow a website document

This commit is contained in:
Christophe Matthieu 2014-10-24 11:33:15 +02:00
parent 83b4742b56
commit 1a5bfdc055
1 changed files with 1 additions and 2 deletions

View File

@ -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");