From c185c83426deb650bf75db026297ebd7361c752f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 21 Mar 2014 23:47:29 +0100 Subject: [PATCH] Fix set_value of Calendar widget When saving record with focus on calendar widget (which was changed but without final proper value), the calendar set it to empty instead of trying to complete the date. issue3779 review4551002 --- tryton/gui/window/view_form/view/form_gtk/calendar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tryton/gui/window/view_form/view/form_gtk/calendar.py b/tryton/gui/window/view_form/view/form_gtk/calendar.py index c3c767d513..bfab5539db 100644 --- a/tryton/gui/window/view_form/view/form_gtk/calendar.py +++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py @@ -48,8 +48,7 @@ class Calendar(WidgetInterface): return self.entry.grab_focus() def set_value(self, record, field): - field.set_client(record, self.entry.get_text()) - return True + field.set_client(record, self.get_value()) def get_value(self): return self.entry.date_get(set_text=False)