From 1cf284e91e88a0df95f9fd5fcadf5688d6709760 Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Tue, 9 Apr 2019 06:16:41 +0000 Subject: [PATCH] [FIX] calendar: alarm for past events Before this commit, Odoo notifies the user of all the recurring past events, existing before the installation of the module Calendar (old events imported when synchronizing with Google, for instance). This occurs only the first time a synchronization with Google is made. This occurs because Odoo notify all the events that occurs since the last time it notified, and the first time you install the module the date of the last notification is empty. Now, when the module Calendar is installed, the date of the last notification is set by default to the current date (the date of the installation of the module) opw-1942443 closes odoo/odoo#32535 Signed-off-by: Nicolas Martinelli (nim) --- addons/calendar/models/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/models/res_partner.py b/addons/calendar/models/res_partner.py index 403d70b18fc..261b955fc8f 100644 --- a/addons/calendar/models/res_partner.py +++ b/addons/calendar/models/res_partner.py @@ -11,7 +11,7 @@ from odoo.addons.calendar.models.calendar import get_real_ids class Partner(models.Model): _inherit = 'res.partner' - calendar_last_notif_ack = fields.Datetime('Last notification marked as read from base Calendar') + calendar_last_notif_ack = fields.Datetime('Last notification marked as read from base Calendar', default=fields.Datetime.now) @api.multi def get_attendee_detail(self, meeting_id):