From 2e515a61bc9da0660d906d2b2931fba1ac8793e3 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 23 Jan 2018 14:07:57 +0100 Subject: [PATCH] [FIX] mail: res_model of followers should compute as uid=1 Take as example: having demo user as expense manager create with demo user an expense sheet for the employee linked to admin on save, there was an access rights error for the write on mail_followers After this commit, there isn't the error anymore, since the computation of the field related is done with sudo OPW 804740 --- addons/mail/models/mail_followers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/models/mail_followers.py b/addons/mail/models/mail_followers.py index ce169c91127..d437c520c80 100644 --- a/addons/mail/models/mail_followers.py +++ b/addons/mail/models/mail_followers.py @@ -23,7 +23,7 @@ class Followers(models.Model): index=True, required=True, ondelete='cascade', help='Model of the followed resource') res_model = fields.Char( - 'Related Document Model Name', index=True, readonly=True, related='res_model_id.model', store=True) + 'Related Document Model Name', index=True, readonly=True, related='res_model_id.model', store=True, compute_sudo=True) res_id = fields.Integer( 'Related Document ID', index=True, help='Id of the followed resource') partner_id = fields.Many2one(