From ce58c83872bf858021c81a56214f7b623d9918fe Mon Sep 17 00:00:00 2001 From: Arnaud Joset Date: Wed, 3 Mar 2021 12:35:10 +0000 Subject: [PATCH] [IMP] calendar: set default stop different than default start Before this commit, the default stop was equal to default start, creating events with duration = 0. closes odoo/odoo#67146 Taskid: 2475473 Signed-off-by: Yannick Tivisse (yti) --- addons/calendar/models/calendar_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/models/calendar_event.py b/addons/calendar/models/calendar_event.py index adf3fc95934..500241de5fd 100644 --- a/addons/calendar/models/calendar_event.py +++ b/addons/calendar/models/calendar_event.py @@ -203,7 +203,7 @@ class Meeting(models.Model): 'Start', required=True, tracking=True, default=fields.Date.today, help="Start date of an event, without time for full days events") stop = fields.Datetime( - 'Stop', required=True, tracking=True, default=fields.Date.today, + 'Stop', required=True, tracking=True, default=lambda self: fields.Datetime.today() + timedelta(hours=1), compute='_compute_stop', readonly=False, store=True, help="Stop date of an event, without time for full days events")