[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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user