From a78c2e3d390e50e6e4a1d4b5e4a5ff85181f480c Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 14 Jul 2016 16:52:31 +0200 Subject: [PATCH] [FIX] website_mail_channel: fix datetime typo in new API migration The migration to new API changed `import datetime` to `from datetime import datetime`, subtly breaking existing calls. See also 8250762fe889ac7161400065b547aa0901d43fa7 --- addons/website_mail_channel/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_mail_channel/controllers/main.py b/addons/website_mail_channel/controllers/main.py index 0620d86efa3..282338509ef 100644 --- a/addons/website_mail_channel/controllers/main.py +++ b/addons/website_mail_channel/controllers/main.py @@ -30,7 +30,7 @@ class MailGroup(http.Controller): """ date is (of course) a datetime so start and end are datetime strings, but we just want date strings """ - return (datetime.datetime + return (datetime .strptime(dt, tools.DEFAULT_SERVER_DATETIME_FORMAT) .date() # may be unnecessary? .strftime(tools.DEFAULT_SERVER_DATE_FORMAT))