diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index 86ce6993a90..272e119f94c 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -59,12 +59,6 @@ class WebsiteForum(WebsiteProfile): }) return "/forum/%s" % slug(forum_id) - @http.route('/forum/notification_read', type='json', auth="user", methods=['POST'], website=True) - def notification_read(self, **kwargs): - if kwargs.get('notification_id'): - request.env['mail.message'].browse([int(kwargs.get('notification_id'))]).set_message_done() - return True - def sitemap_forum(env, rule, qs): Forum = env['forum.forum'] dom = sitemap_qs2dom(qs, '/forum', Forum._rec_name) diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 1557d6fd50f..51cae0cc28f 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -30,7 +30,6 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ 'click .accept_answer:not(.karma_required)': '_onAcceptAnswerClick', 'click .favourite_question': '_onFavoriteQuestionClick', 'click .comment_delete': '_onDeleteCommentClick', - 'click .notification_close': '_onCloseNotificationClick', 'click .js_close_intro': '_onCloseIntroClick', }, @@ -451,22 +450,6 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ $link.parents('.comment').first().remove(); }); }, - /** - * @private - * @param {Event} ev - */ - _onCloseNotificationClick: function (ev) { - if (!session.is_website_user) { - ev.preventDefault(); - var $link = $(ev.currentTarget); - this._rpc({ - route: '/forum/notification_read', - params: { - notification_id: $link.attr('id'), - }, - }); - } - }, /** * @private * @param {Event} ev