changeset 65c6d70e6874 in tryton:4.8
details: https://hg.tryton.org/tryton?cmd=changeset;node=65c6d70e6874
description:
Force to parse datetime entries before getting value
The value property is only updated on activate or focus-out but
get_value is
also be called to store the value without changing the focus.
issue8205
review281181002
(grafted from 7e60b661c09f7ffc52daa3c109562e394cd5a98e)
diffstat:
tryton/gui/window/view_form/view/form_gtk/calendar.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 0dc8fdd1f1d2 -r 65c6d70e6874
tryton/gui/window/view_form/view/form_gtk/calendar.py
--- a/tryton/gui/window/view_form/view/form_gtk/calendar.py Mon Apr 22
10:32:06 2019 +0200
+++ b/tryton/gui/window/view_form/view/form_gtk/calendar.py Wed Mar 27
00:41:18 2019 +0100
@@ -56,7 +56,7 @@
def modified(self):
if self.record and self.field:
field_value = self.cast(self.field.get_client(self.record))
- return field_value != self.entry.props.value
+ return field_value != self.get_value()
return False
def sig_key_press(self, widget, event):
@@ -66,6 +66,7 @@
field.set_client(record, self.get_value())
def get_value(self):
+ self.entry.parse()
return self.entry.props.value
def set_format(self, record, field):