summaryrefslogtreecommitdiff
path: root/addons/mail/controllers/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/controllers/main.py')
-rw-r--r--addons/mail/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/controllers/main.py b/addons/mail/controllers/main.py
index 13a56f02e3e..de6f0a63487 100644
--- a/addons/mail/controllers/main.py
+++ b/addons/mail/controllers/main.py
@@ -164,7 +164,7 @@ class MailController(http.Controller):
return self._redirect_to_messaging()
Model = request.env[model]
try:
- Model.browse(res_id).message_unsubscribe_users()
+ Model.browse(res_id).sudo().message_unsubscribe_users([request.uid])
except:
return self._redirect_to_messaging()
return werkzeug.utils.redirect('/mail/view?%s' % url_encode({'model': model, 'res_id': res_id}))