From c44f7a03691c327f6c2d9529e7025f7f3600fa7b Mon Sep 17 00:00:00 2001
From: Swapnesh Shah <swapneshshah111@gmail.com>
Date: Sun, 27 Oct 2019 10:19:05 +0000
Subject: [PATCH] [FIX] calendar: Allow any user to set calendar_last_notif_ack

Fixes https://github.com/odoo/odoo/issues/39358
Before this commit Internal user (With no other Rights) cannot perform any activity on Reminder Popup due to missing rights to set calendar_last_notif_ack field.
With this fix, we are now using sudo to write calendar_last_notif_ack

closes odoo/odoo#40104

X-original-commit: 91560fae56f1cba09141eefa1d0da03f4a7b3f72
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
---
 addons/calendar/controllers/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/calendar/controllers/main.py b/addons/calendar/controllers/main.py
index 64b8812c7c2a..cfecfb96345d 100644
--- a/addons/calendar/controllers/main.py
+++ b/addons/calendar/controllers/main.py
@@ -70,4 +70,4 @@ class CalendarController(http.Controller):
 
     @http.route('/calendar/notify_ack', type='json', auth="user")
     def notify_ack(self, type=''):
-        return request.env['res.partner']._set_calendar_last_notif_ack()
+        return request.env['res.partner'].sudo()._set_calendar_last_notif_ack()
-- 
GitLab