From e2280783a2223a0cf328de92fdb9737508a59954 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 20 Feb 2018 18:03:24 +0100 Subject: [FIX] mail: no view edit on forum link in notif When sending notification from the frontend, if a template is rendered for it and the user has the group "website.group_website_publisher" he will get inherit_branding adding on elements things like: data-oe-id="42" data-oe-model="ir.ui.view" data-oe-field="arch" but the chatter system has feature automatically redirecting an element that have attribute "data-oe-id": this caused for example that a link notification towards the forum would instead be redirecting to editing the view of the notification. This fix distinguish the inherit_branding in the chatter feature and ignore them. opw-813333 closes #23225 --- addons/mail/static/src/js/thread.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/mail/static/src/js/thread.js') diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js index 2176eff55fa..36180a5ea2a 100644 --- a/addons/mail/static/src/js/thread.js +++ b/addons/mail/static/src/js/thread.js @@ -199,6 +199,10 @@ var Thread = Widget.extend({ }); }, on_click_redirect: function (event) { + // ignore inherited branding + if ($(event.target).data('oe-field') !== undefined) { + return; + } var id = $(event.target).data('oe-id'); if (id) { event.preventDefault(); -- cgit v1.2.3