Skip to content
Permalink
Browse files

[IMP] mail: follower name in confirmation dialog on unfollow

Also fixing test so that it uses an existing follower.

Task-ID 1919551
  • Loading branch information...
kma-odoo authored and alexkuhn committed Feb 15, 2019
1 parent 0a09a4d commit 66354f83f450632bab2b1d3ef757c097c87769c5
Showing with 4 additions and 2 deletions.
  1. +3 −1 addons/mail/static/src/js/followers.js
  2. +1 −1 addons/mail/static/tests/chatter_tests.js
@@ -248,8 +248,10 @@ var Followers = AbstractField.extend({
_unfollow: function (ids) {
var self = this;
return new Promise(function (resolve, reject) {
var text = _t("Warning! \n If you remove a follower, he won't be notified of any email or discussion on this document.\n Do you really want to remove this follower ?");
var follower = _.find(self.followers, { res_id: ids.partner_ids ? ids.partner_ids[0] : ids.channel_ids[0] });
var text = _.str.sprintf(_t("If you remove a follower, he won't be notified of any email or discussion on this document. Do you really want to remove %s?"), follower.name);
Dialog.confirm(this, text, {
title: _t('Warning'),
confirm_callback: function () {
var args = [
[self.res_id],
@@ -2085,7 +2085,7 @@ QUnit.test('followers widget: follow/unfollow, edit subtypes', async function (a
assert.expect(24);

var resID = 2;
var partnerID = 1;
var partnerID = 2;
var followers = [];
var nbReads = 0;
var subtypes = [

0 comments on commit 66354f8

Please sign in to comment.
You can’t perform that action at this time.