From f75243f23751ae4199ad6e7c83024f4f28feac44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 8 May 2010 09:24:51 +0200 Subject: [PATCH] Fix datetime combine when value is False for issue1560 --- work.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/work.py b/work.py index ad821c6da7..18d13a5226 100644 --- a/work.py +++ b/work.py @@ -230,7 +230,10 @@ class Work(ModelSQL, ModelView): for fun_field, db_field in zip(fun_fields, db_fields): if fun_field == name: self.write(cursor, user, ids, { - db_field: datetime.datetime.combine(value, datetime.time()), + db_field: value \ + and datetime.datetime.combine(value, + datetime.time()) \ + or False, }, context=context) break