From 320cd68fdc4f104fc6ea867a0df22507c47c6b30 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Mon, 25 Oct 2010 11:03:21 +0200 Subject: [PATCH] [FIX] fixed calendar search algorithm bzr revid: olt@tinyerp.com-20101025090321-cirhp4k36st1evef --- addons/base_calendar/base_calendar.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 326ed33b83d..dfbdc745613 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1292,8 +1292,8 @@ true, it will allow you to hide the event alarm information without removing it. count = 0 for data in cr.dictfetchall(): - start_date = base_start_date and datetime.strptime(base_start_date[:10], "%Y-%m-%d") or False - until_date = base_until_date and datetime.strptime(base_until_date[:10], "%Y-%m-%d") or False + start_date = base_start_date and datetime.strptime(base_start_date[:10]+ ' 00:00:00' , "%Y-%m-%d %H:%M:%S") or False + until_date = base_until_date and datetime.strptime(base_until_date[:10]+ ' 23:59:59', "%Y-%m-%d %H:%M:%S") or False if count > limit: break event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S") @@ -1426,8 +1426,9 @@ true, it will allow you to hide the event alarm information without removing it. args_without_date = [] start_date = False until_date = False + for arg in args: - if arg[0] not in ('date', unicode('date')): + if arg[0] not in ('date', unicode('date'), 'date_deadline', unicode('date_deadline')): args_without_date.append(arg) else: if arg[1] in ('>', '>='):