[FIX] calendar: wrong user updated when setting last notif ack
Since commit 91560fae56f1cba0914, we are using sudo to write calendar_last_notif_ack, but we need to update the real partner stored in the context. opw-2133566 closes odoo/odoo#41982 X-original-commit: 4d6416dbc82f07c91111457b503ccfc737f802c9 Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
This commit is contained in:
committed by
Nicolas Martinelli
parent
c2cf0b52b1
commit
36e4818b17
@@ -34,6 +34,6 @@ class Partner(models.Model):
|
||||
|
||||
@api.model
|
||||
def _set_calendar_last_notif_ack(self):
|
||||
partner = self.env['res.users'].browse(self.env.uid).partner_id
|
||||
partner = self.env['res.users'].browse(self.env.context.get('uid',self.env.uid)).partner_id
|
||||
partner.write({'calendar_last_notif_ack': datetime.now()})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user