From 4fa39c0e1994ffeffb8937f935634aa29e523da8 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 25 Nov 2016 09:13:30 +0100 Subject: [PATCH] [FIX] website_forum: ask reason when refuse a post. Call was done in ajax to speed up the moderation and don't wait refresh at each accpet/refuse post. But the problem is that when you refuse a post, you need to be redirected to a new page to ask more infos about the reason. The fix is to do the request in ajax only when it is an 'accepted' post. This commits fixes odoo/odoo@14462 --- addons/website_forum/static/src/js/website_forum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 60073ffd70a..e68701c6df4 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -138,7 +138,7 @@ if(!$('.website_forum').length) { }); }); - $('.o_js_validation_queue a').on('click', function (ev) { + $(".o_js_validation_queue a[href*='/validate']").on('click', function (ev) { ev.preventDefault(); var $link = $(ev.currentTarget); var self = $(this);