summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
diff options
context:
space:
mode:
authorAnh Thao Pham (pta) <pta@odoo.com>2020-05-22 14:00:02 +0000
committerAnh Thao Pham (pta) <pta@odoo.com>2020-05-25 10:37:37 +0000
commit71fb04ea3cc63ac3a2945a4a6a6b937c3c9338c9 (patch)
treec1fe9969fcfb22eeb2416092422528f525e1f83f /addons/mail/static/src/js
parent58f80b60bf9d789f5c0c2a8ac0a786bac3f59139 (diff)
[FIX] mail: fix error when clicking on follower icon in chatter
- Go to any page where there is a chatter - Click on the followers list icon to display all followers - Click on the icon (not the name) of a follower This generates an error. The redirect is executed in JS by retrieving the model and the id added to the <a> element. When clicking on the follower icon, we are not clicking on the <a> element but on a child. The model and the id have to be retrieved from its parent element. opw-2256795 closes odoo/odoo#51790 X-original-commit: 11c4a2907e635662216ebc0e745f0ce9d16771cb Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js')
-rw-r--r--addons/mail/static/src/js/followers.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/followers.js b/addons/mail/static/src/js/followers.js
index 7179b159663..bed5d27f176 100644
--- a/addons/mail/static/src/js/followers.js
+++ b/addons/mail/static/src/js/followers.js
@@ -415,7 +415,7 @@ var Followers = AbstractField.extend({
*/
_onRedirect: function (ev) {
ev.preventDefault();
- var $target = $(ev.target);
+ var $target = $(ev.target).closest('.o_mail_redirect');
this.do_action({
type: 'ir.actions.act_window',
view_mode: 'form',