From 882ce44bf101ae01f700908dd0dc0035e0cfb085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Sep 2008 13:22:39 +0200 Subject: [PATCH] Use now() for trigger_date comparaison instead of date for issue345 --- trytond/res/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/res/request.py b/trytond/res/request.py index 7753752f71..cb6873c5ef 100644 --- a/trytond/res/request.py +++ b/trytond/res/request.py @@ -131,8 +131,8 @@ class Request(OSV): def request_get(self, cursor, user): cursor.execute('SELECT id FROM res_request ' \ 'WHERE act_to = %s ' \ - 'AND (trigger_date <= %s OR trigger_date IS NULL) ' \ - 'AND active = True', (user, time.strftime('%Y-%m-%d'))) + 'AND (trigger_date <= now() OR trigger_date IS NULL) ' \ + 'AND active = True', (user,)) ids = [x[0] for x in cursor.fetchall()] cursor.execute('SELECT id FROM res_request ' \ 'WHERE act_from = %s AND (act_to <> %s) ' \