From aba3e1383398f3871bbd6e7907a01026de2b8728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 18 Oct 2015 16:53:03 +0200 Subject: [PATCH] Always keep the oldest timestamp The optimistic lock should be checked with the oldest timestamp to be safer. issue2687 review23561002 --- tryton/gui/window/view_form/model/record.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/view_form/model/record.py b/tryton/gui/window/view_form/model/record.py index 3650b06a11..906e46d20d 100644 --- a/tryton/gui/window/view_form/model/record.py +++ b/tryton/gui/window/view_form/model/record.py @@ -436,7 +436,9 @@ class Record(SignalEvent): later = {} for fieldname, value in val.iteritems(): if fieldname == '_timestamp': - self._timestamp = value + # Always keep the older timestamp + if not self._timestamp: + self._timestamp = value continue if fieldname not in self.group.fields: if fieldname == 'rec_name':