[FIX] fixed calendar search algorithm

bzr revid: olt@tinyerp.com-20101025090321-cirhp4k36st1evef
This commit is contained in:
olt@tinyerp.com 2010-10-25 11:03:21 +02:00
parent bc2dc4dcdb
commit 320cd68fdc
1 changed files with 4 additions and 3 deletions

View File

@ -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 ('>', '>='):