From 82b2b3a626befc97c14591c80b4952c5eed99f6d Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 22 Aug 2012 11:57:22 +0530 Subject: [PATCH 1/7] [IMP]add name and checkbox on click of follow and make it work as add in subtype_ids in followers bzr revid: sgo@tinyerp.com-20120822062722-ru93dme523lnuko7 --- addons/mail/mail_thread.py | 6 ++-- addons/mail/static/src/js/mail_followers.js | 35 +++++++++++++++++-- addons/mail/static/src/xml/mail_followers.xml | 5 +++ 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index ddace0cf9b9..d552dc108a4 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -1192,10 +1192,10 @@ class mail_thread(osv.Model): """ Set as read. """ return self.write(cr, uid, ids, {'message_state': True}, context=context) - def message_subscribe_udpate_subtypes(self, cr, uid, ids, user_id, subtype_ids): + def message_subscribe_udpate_subtypes(self, cr, uid, ids, user_id, subtype_ids,context=None): subscription_obj = self.pool.get('mail.followers') - subscription_ids = subscription_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids)]) - return subscription_obj.write(cr, uid, subscription_ids, {'subtype_ids': [6, 0 , subtype_ids]}, context = context) #overright or add new one + subscription_ids = subscription_obj.search(cr, uid, [('res_model', '=', self._name), ('res_id', 'in', ids),('user_id','=',user_id)]) + return subscription_obj.write(cr, uid, subscription_ids, {'subtype_ids': [(6, 0 , subtype_ids)]}, context = context) #overright or add new one def message_subscription_remove_subtype(self, cr, uid, ids, user_id, subtype_id): subscription_obj = self.pool.get('mail.followers') diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 0e920f73041..4e49919e7d2 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -31,6 +31,7 @@ openerp_mail_followers = function(session, mail) { this.params.display_control = this.node.attrs.display_control || false; this.params.display_actions = this.node.attrs.display_actions || false; this.ds_model = new session.web.DataSetSearch(this, this.view.model); + this.sub_model = new session.web.DataSetSearch(this,'mail.message.subtype') this.ds_follow = new session.web.DataSetSearch(this, this.field.relation); }, @@ -42,8 +43,21 @@ openerp_mail_followers = function(session, mail) { this._check_visibility(); this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }); if (! this.params.display_control) { - this.$element.find('button.oe_mail_button_followers').hide(); } - this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); }) + this.$element.find('button.oe_mail_button_followers').hide(); + } + this.$element.find('ul.oe_mail_recthread_subtype').click(function () { + var sublist = new Array(); + _($(this).find('.oe_msg_subtype_check')).each(function (record){ + if($(record).is(':checked')) { + sublist.push(parseInt($(record).attr('id'))) + } + }); + self.ds_model.call('message_subscribe_udpate_subtypes',[[self.view.datarecord.id],self.session.uid,sublist]) + }) + this.$element.find('button.oe_mail_button_follow').click(function () { + self.add_subtype(); + self.do_follow(); + }) .mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) .mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); }) @@ -103,10 +117,25 @@ openerp_mail_followers = function(session, mail) { this.$element.find('button.oe_mail_button_follow').show(); this.$element.find('button.oe_mail_button_unfollow').hide(); } }, - + + subtype_value: function(value_) { + return this.sub_model.call('read', [value_ || this.get_value(),['name', 'default']]).then(this.proxy('read_subtype')); + }, + + read_subtype: function(records) { + this.reinit() + var subtype_list = this.$element.find('ul.oe_mail_recthread_subtype').empty(); + _(records).each(function (record) { + $(session.web.qweb.render('mail.subtype.ids', {'record': record})).appendTo(subtype_list); + }); + }, + do_follow: function () { return this.ds_model.call('message_subscribe', [[this.view.datarecord.id]]).pipe(this.proxy('set_value')); }, + add_subtype: function () { + return this.sub_model.call('search', [[['model_ids.model','=',this.view.model]]]).pipe(this.proxy('subtype_value')); + }, do_unfollow: function () { return this.ds_model.call('message_unsubscribe', [[this.view.datarecord.id]]).pipe(this.proxy('set_value')); diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 53c899b9569..9979aa9d6fa 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -16,6 +16,7 @@

+ @@ -27,5 +28,9 @@ +
  • + + +
  • From ecdab52f06551bca82a53544c52194970779a4e1 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Wed, 22 Aug 2012 14:53:17 +0530 Subject: [PATCH 2/7] [IMP]if subtype selected its write in follower and improve code bzr revid: sgo@tinyerp.com-20120822092317-4nlhfton4ltk1lcq --- addons/mail/static/src/js/mail_followers.js | 29 ++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 4e49919e7d2..2940ae54288 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -33,6 +33,7 @@ openerp_mail_followers = function(session, mail) { this.ds_model = new session.web.DataSetSearch(this, this.view.model); this.sub_model = new session.web.DataSetSearch(this,'mail.message.subtype') this.ds_follow = new session.web.DataSetSearch(this, this.field.relation); + this.follow_model = new session.web.DataSetSearch(this,'mail.followers') }, start: function() { @@ -41,6 +42,8 @@ openerp_mail_followers = function(session, mail) { // any other method to know if the view is in create mode anymore this.view.on("change:actual_mode", this, this._check_visibility); this._check_visibility(); + self.add_subtype(); + this.$element.find('ul.oe_mail_recthread_subtype').hide() this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }); if (! this.params.display_control) { this.$element.find('button.oe_mail_button_followers').hide(); @@ -55,12 +58,13 @@ openerp_mail_followers = function(session, mail) { self.ds_model.call('message_subscribe_udpate_subtypes',[[self.view.datarecord.id],self.session.uid,sublist]) }) this.$element.find('button.oe_mail_button_follow').click(function () { - self.add_subtype(); self.do_follow(); + self.$element.find('ul.oe_mail_recthread_subtype').show() }) .mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) .mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); - this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); }) + this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); + self.$element.find('ul.oe_mail_recthread_subtype').hide() }) .mouseover(function () { $(this).html('Unfollow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) .mouseleave(function () { $(this).html('Following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); this.reinit(); @@ -81,6 +85,7 @@ openerp_mail_followers = function(session, mail) { this.$element.find('button.oe_mail_button_followers').html('Hide followers') this.$element.find('button.oe_mail_button_follow').hide(); this.$element.find('button.oe_mail_button_unfollow').hide(); + this.$element.find('ul.oe_mail_recthread_subtype').hide() }, set_value: function(value_) { @@ -112,10 +117,12 @@ openerp_mail_followers = function(session, mail) { }); if (this.is_subscriber) { this.$element.find('button.oe_mail_button_follow').hide(); - this.$element.find('button.oe_mail_button_unfollow').show(); } + this.$element.find('button.oe_mail_button_unfollow').show(); + this.$element.find('ul.oe_mail_recthread_subtype').show()} else { this.$element.find('button.oe_mail_button_follow').show(); - this.$element.find('button.oe_mail_button_unfollow').hide(); } + this.$element.find('button.oe_mail_button_unfollow').hide(); + this.$element.find('ul.oe_mail_recthread_subtype').hide() } }, subtype_value: function(value_) { @@ -123,9 +130,19 @@ openerp_mail_followers = function(session, mail) { }, read_subtype: function(records) { - this.reinit() + var self = this var subtype_list = this.$element.find('ul.oe_mail_recthread_subtype').empty(); - _(records).each(function (record) { + var follow_ids = this.follow_model.call('search',[[['res_model','=',this.ds_model.model],['res_id','=',this.view.datarecord.id],['user_id','=',this.session.uid]]]) + follow_ids.then(function (record){ + var msg_subtype = self.follow_model.call('read', [record,['subtype_ids']]); + if(msg_subtype){ + msg_subtype.then(function (subtype){ + _(subtype[0].subtype_ids).each(function (subtype_id){ + self.$element.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true + }); + })} + }); + _(records).each(function (record) { $(session.web.qweb.render('mail.subtype.ids', {'record': record})).appendTo(subtype_list); }); }, From 117e0dffa03fc8ca55254310fc02455fc0930276 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 23 Aug 2012 10:30:29 +0530 Subject: [PATCH 3/7] [IMP]improve code bzr revid: sgo@tinyerp.com-20120823050029-wz5ce5f8xsrsbqyq --- addons/mail/static/src/js/mail_followers.js | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 2940ae54288..a468a0b25d9 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -42,21 +42,20 @@ openerp_mail_followers = function(session, mail) { // any other method to know if the view is in create mode anymore this.view.on("change:actual_mode", this, this._check_visibility); this._check_visibility(); - self.add_subtype(); + self.search_subtype(); this.$element.find('ul.oe_mail_recthread_subtype').hide() + this.$element.find('ul.oe_mail_recthread_subtype').click(function () { + var subtypelist = new Array(); + _($(this).find('.oe_msg_subtype_check')).each(function (record){ + if($(record).is(':checked')) { + subtypelist.push(parseInt($(record).attr('id')))} + }); + self.ds_model.call('message_subscribe_udpate_subtypes',[[self.view.datarecord.id],self.session.uid,subtypelist]) + }) this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }); if (! this.params.display_control) { this.$element.find('button.oe_mail_button_followers').hide(); } - this.$element.find('ul.oe_mail_recthread_subtype').click(function () { - var sublist = new Array(); - _($(this).find('.oe_msg_subtype_check')).each(function (record){ - if($(record).is(':checked')) { - sublist.push(parseInt($(record).attr('id'))) - } - }); - self.ds_model.call('message_subscribe_udpate_subtypes',[[self.view.datarecord.id],self.session.uid,sublist]) - }) this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); self.$element.find('ul.oe_mail_recthread_subtype').show() @@ -72,6 +71,7 @@ openerp_mail_followers = function(session, mail) { _check_visibility: function() { this.$element.toggle(this.view.get("actual_mode") !== "create"); + if(this.view.get("actual_mode") == "create"){this.search_subtype();} }, destroy: function () { @@ -132,25 +132,25 @@ openerp_mail_followers = function(session, mail) { read_subtype: function(records) { var self = this var subtype_list = this.$element.find('ul.oe_mail_recthread_subtype').empty(); - var follow_ids = this.follow_model.call('search',[[['res_model','=',this.ds_model.model],['res_id','=',this.view.datarecord.id],['user_id','=',this.session.uid]]]) - follow_ids.then(function (record){ - var msg_subtype = self.follow_model.call('read', [record,['subtype_ids']]); - if(msg_subtype){ - msg_subtype.then(function (subtype){ - _(subtype[0].subtype_ids).each(function (subtype_id){ - self.$element.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true - }); - })} - }); - _(records).each(function (record) { + var follow_ids = this.follow_model.call('search',[[['res_model','=',this.ds_model.model],['res_id','=',this.view.datarecord.id],['user_id','=',this.session.uid]]]) + follow_ids.then(function (record){ + var follow_read = self.follow_model.call('read', [record,['subtype_ids']]); + follow_read.then(function (follow_record){ + if(follow_record.length != 0){ + _(follow_record[0].subtype_ids).each(function (subtype_id){ + self.$element.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true + });} + }) + }); + _(records).each(function (record) { $(session.web.qweb.render('mail.subtype.ids', {'record': record})).appendTo(subtype_list); - }); - }, + }); + }, do_follow: function () { return this.ds_model.call('message_subscribe', [[this.view.datarecord.id]]).pipe(this.proxy('set_value')); }, - add_subtype: function () { + search_subtype: function () { return this.sub_model.call('search', [[['model_ids.model','=',this.view.model]]]).pipe(this.proxy('subtype_value')); }, From 753e55c089e5faf1ff51e6790f82f1fffc83d5e6 Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 23 Aug 2012 11:32:16 +0530 Subject: [PATCH 4/7] [IMP]improve code and naming convention bzr revid: sgo@tinyerp.com-20120823060216-sp10hvix2uw3wrg0 --- addons/mail/static/src/js/mail_followers.js | 42 +++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index a468a0b25d9..3ba080e19f0 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -33,7 +33,7 @@ openerp_mail_followers = function(session, mail) { this.ds_model = new session.web.DataSetSearch(this, this.view.model); this.sub_model = new session.web.DataSetSearch(this,'mail.message.subtype') this.ds_follow = new session.web.DataSetSearch(this, this.field.relation); - this.follow_model = new session.web.DataSetSearch(this,'mail.followers') + this.follower_model = new session.web.DataSetSearch(this,'mail.followers') }, start: function() { @@ -42,7 +42,7 @@ openerp_mail_followers = function(session, mail) { // any other method to know if the view is in create mode anymore this.view.on("change:actual_mode", this, this._check_visibility); this._check_visibility(); - self.search_subtype(); + this.fetch_subtype(); this.$element.find('ul.oe_mail_recthread_subtype').hide() this.$element.find('ul.oe_mail_recthread_subtype').click(function () { var subtypelist = new Array(); @@ -71,7 +71,7 @@ openerp_mail_followers = function(session, mail) { _check_visibility: function() { this.$element.toggle(this.view.get("actual_mode") !== "create"); - if(this.view.get("actual_mode") == "create"){this.search_subtype();} + if(this.view.get("actual_mode") == "create"){this.fetch_subtype();} }, destroy: function () { @@ -125,33 +125,37 @@ openerp_mail_followers = function(session, mail) { this.$element.find('ul.oe_mail_recthread_subtype').hide() } }, - subtype_value: function(value_) { - return this.sub_model.call('read', [value_ || this.get_value(),['name', 'default']]).then(this.proxy('read_subtype')); - }, - - read_subtype: function(records) { + // Display the subtypes of each records. + display_subtype: function(records) { var self = this var subtype_list = this.$element.find('ul.oe_mail_recthread_subtype').empty(); - var follow_ids = this.follow_model.call('search',[[['res_model','=',this.ds_model.model],['res_id','=',this.view.datarecord.id],['user_id','=',this.session.uid]]]) - follow_ids.then(function (record){ - var follow_read = self.follow_model.call('read', [record,['subtype_ids']]); - follow_read.then(function (follow_record){ - if(follow_record.length != 0){ - _(follow_record[0].subtype_ids).each(function (subtype_id){ - self.$element.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true - });} + var follower_ids = this.follower_model.call('search',[[['res_model','=',this.ds_model.model],['res_id','=',this.view.datarecord.id],['user_id','=',this.session.uid]]]) + follower_ids.then(function (record){ + var follower_read = self.follower_model.call('read', [record,['subtype_ids']]); + follower_read.then(function (follower_record){ + if(follower_record.length != 0){ + _(follower_record[0].subtype_ids).each(function (subtype_id){ + self.$element.find('.oe_msg_subtype_check[id=' + subtype_id + ']')[0].checked=true + }); + } }) }); _(records).each(function (record) { $(session.web.qweb.render('mail.subtype.ids', {'record': record})).appendTo(subtype_list); }); - }, + }, do_follow: function () { return this.ds_model.call('message_subscribe', [[this.view.datarecord.id]]).pipe(this.proxy('set_value')); }, - search_subtype: function () { - return this.sub_model.call('search', [[['model_ids.model','=',this.view.model]]]).pipe(this.proxy('subtype_value')); + + //fetch subtype from subtype model + fetch_subtype: function () { + var self = this + var subtype_object = this.sub_model.call('search', [[['model_ids.model','=',this.view.model]]]); + subtype_object.then(function (subtype_ids){ + self.sub_model.call('read', [subtype_ids || self.get_value(),['name', 'default']]).then(self.proxy('display_subtype')); + }); }, do_unfollow: function () { From 27e0487ee742ca0692557ccc38508c18904c531b Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 23 Aug 2012 14:36:16 +0530 Subject: [PATCH 5/7] [IMP] improve code in mail.xml bzr revid: fka@tinyerp.com-20120823090616-e2ro792wqyywxtt9 --- addons/mail/static/src/js/mail_followers.js | 2 +- addons/mail/static/src/xml/mail_followers.xml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 3ba080e19f0..76280e38ae3 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -141,7 +141,7 @@ openerp_mail_followers = function(session, mail) { }) }); _(records).each(function (record) { - $(session.web.qweb.render('mail.subtype.ids', {'record': record})).appendTo(subtype_list); + $(session.web.qweb.render('mail.record_thread.subtype', {'record': record})).appendTo(subtype_list); }); }, diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index 9979aa9d6fa..c0cc747a817 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -28,9 +28,17 @@ -
  • - - +
  • + + + + + +
    + + + +
  • From 107eade158b0950e01277e09fbed0a5c0459f84e Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Thu, 23 Aug 2012 15:51:38 +0530 Subject: [PATCH 6/7] [IMP] make 1st latter of name of subtype bzr revid: fka@tinyerp.com-20120823102138-0cjhjiw5ob6z2i7e --- addons/mail/static/src/js/mail_followers.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 76280e38ae3..42e331863be 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -141,6 +141,9 @@ openerp_mail_followers = function(session, mail) { }) }); _(records).each(function (record) { + record.name = record.name.toLowerCase().replace(/\b[a-z]/g, function(letter) { + return letter.toUpperCase(); + }); $(session.web.qweb.render('mail.record_thread.subtype', {'record': record})).appendTo(subtype_list); }); }, From 0d8bfaaf87e7013190f0587e411ab0e3a467db6c Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Thu, 23 Aug 2012 16:17:05 +0530 Subject: [PATCH 7/7] [IMP]add comment whr needed bzr revid: sgo@tinyerp.com-20120823104705-ji03v95oe2ycz2k2 --- addons/mail/static/src/js/mail_followers.js | 9 ++++----- addons/mail/static/src/xml/mail_followers.xml | 9 +++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js index 42e331863be..29761ff66ce 100644 --- a/addons/mail/static/src/js/mail_followers.js +++ b/addons/mail/static/src/js/mail_followers.js @@ -43,7 +43,6 @@ openerp_mail_followers = function(session, mail) { this.view.on("change:actual_mode", this, this._check_visibility); this._check_visibility(); this.fetch_subtype(); - this.$element.find('ul.oe_mail_recthread_subtype').hide() this.$element.find('ul.oe_mail_recthread_subtype').click(function () { var subtypelist = new Array(); _($(this).find('.oe_msg_subtype_check')).each(function (record){ @@ -55,15 +54,15 @@ openerp_mail_followers = function(session, mail) { this.$element.find('button.oe_mail_button_followers').click(function () { self.do_toggle_followers(); }); if (! this.params.display_control) { this.$element.find('button.oe_mail_button_followers').hide(); + this.$element.find('ul.oe_mail_recthread_subtype').hide() } this.$element.find('button.oe_mail_button_follow').click(function () { self.do_follow(); - self.$element.find('ul.oe_mail_recthread_subtype').show() + self.fetch_subtype(); }) .mouseover(function () { $(this).html('Follow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) .mouseleave(function () { $(this).html('Not following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); - this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); - self.$element.find('ul.oe_mail_recthread_subtype').hide() }) + this.$element.find('button.oe_mail_button_unfollow').click(function () { self.do_unfollow(); }) .mouseover(function () { $(this).html('Unfollow').removeClass('oe_mail_button_mouseout').addClass('oe_mail_button_mouseover'); }) .mouseleave(function () { $(this).html('Following').removeClass('oe_mail_button_mouseover').addClass('oe_mail_button_mouseout'); }); this.reinit(); @@ -118,7 +117,7 @@ openerp_mail_followers = function(session, mail) { if (this.is_subscriber) { this.$element.find('button.oe_mail_button_follow').hide(); this.$element.find('button.oe_mail_button_unfollow').show(); - this.$element.find('ul.oe_mail_recthread_subtype').show()} + this.$element.find('ul.oe_mail_recthread_subtype').show(); } else { this.$element.find('button.oe_mail_button_follow').show(); this.$element.find('button.oe_mail_button_unfollow').hide(); diff --git a/addons/mail/static/src/xml/mail_followers.xml b/addons/mail/static/src/xml/mail_followers.xml index c0cc747a817..d590407494f 100644 --- a/addons/mail/static/src/xml/mail_followers.xml +++ b/addons/mail/static/src/xml/mail_followers.xml @@ -3,7 +3,7 @@
    @@ -27,7 +27,12 @@
  • -
  • + \ + +