From c49265afa1b0610d52fd356df26491546f1905bf Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 10 Aug 2017 10:18:08 +0200 Subject: [PATCH] [FIX] mail: Access rights error when reading leaves Fine tuning of this commit: b795d69ce8aca2e88182c6d6d6b7af54d536f9dd Steps to reproduce the bug: Leaves > List view > Go into any validated leave > Get Odoo Server Error on access rights opw:693536 --- addons/mail/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py index 17f28807a64..80f24f00af4 100644 --- a/addons/mail/controllers/main.py +++ b/addons/mail/controllers/main.py @@ -116,7 +116,7 @@ class MailController(http.Controller): follower_id = None follower_recs = request.env['mail.followers'].sudo().browse(follower_ids) res_ids = follower_recs.mapped('res_id') - request.env[res_model].browse(res_ids).check_access_rule("write") + request.env[res_model].browse(res_ids).check_access_rule("read") for follower in follower_recs: is_uid = partner_id == follower.partner_id follower_id = follower.id if is_uid else follower_id