[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
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user