summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2018-01-23 14:07:57 +0100
committerLucas Perais (lpe) <lpe@odoo.com>2018-01-24 16:30:25 +0100
commit2e515a61bc9da0660d906d2b2931fba1ac8793e3 (patch)
tree7b1256dfde4b22a406179f700de00814320ccd9b
parent6f2d1b82611f94e23c77ff3bf23522a90c503a9f (diff)
[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
-rw-r--r--addons/mail/models/mail_followers.py2
1 files changed, 1 insertions, 1 deletions
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(