From ecf9613ee50edf2aaa866649f16f4264aa50df5f Mon Sep 17 00:00:00 2001 From: JoshuaJan Date: Fri, 22 Jul 2016 17:38:04 +0800 Subject: [PATCH] [FIX] calendar: fix get_range_domain to match all events. In case of event not all day, the timezone has an impact. So if we search for date >= 2016-01-31 (00:00:00) and that the current timezone is +5, we should search for date >= 2016-01-30 19:00:00. date_to_str will drop the time. This commit closes #12878 This commit closes #12971 --- addons/web_calendar/static/src/js/web_calendar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_calendar/static/src/js/web_calendar.js b/addons/web_calendar/static/src/js/web_calendar.js index 4d113ebe588..d38dc2d673c 100644 --- a/addons/web_calendar/static/src/js/web_calendar.js +++ b/addons/web_calendar/static/src/js/web_calendar.js @@ -841,7 +841,7 @@ var CalendarView = View.extend({ * between given start, end dates. */ get_range_domain: function(domain, start, end) { - var format = time.date_to_str; + var format = time.datetime_to_str; var extend_domain = [[this.date_start, '<=', format(end)]]; if (this.date_stop) { extend_domain.push([this.date_stop, '>=', format(start)]);