[FIX] mail: restore "pencil" icon behaviour in Followers widget

When editing the followers, the "pencil" icon that leads to the edition
of subtypes should be always be displayed, and not only when "debug"
mode is activated. This commit restores this behaviour, as it was not
the case any more.

opw-2144399

closes odoo/odoo#41643

X-original-commit: fd65f85e755eb0b732e0876c1849a0f4806968f1
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2019-12-09 13:57:47 +00:00
parent b5e24e9760
commit d821999025
+3 -1
View File
@@ -143,7 +143,9 @@ class MailController(http.Controller):
@http.route('/mail/read_followers', type='json', auth='user')
def read_followers(self, follower_ids, res_model):
followers = []
is_editable = request.env['mail.followers'].user_has_groups('base.group_no_one')
# When editing the followers, the "pencil" icon that leads to the edition of subtypes
# should be always be displayed and not only when "debug" mode is activated.
is_editable = True
partner_id = request.env.user.partner_id
follower_id = None
follower_recs = request.env['mail.followers'].sudo().browse(follower_ids)