From f095bb4eb63c65e08a01630be5c7e08087928735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 10 Oct 2014 09:59:37 +0200 Subject: [PATCH] Prevent too old revision in form view issue4211 review11551002 --- tryton/gui/window/form.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index efcbf633f3..e347dd847c 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -273,6 +273,10 @@ class Form(SignalEvent, TabContent): return revision = self.screen.context.get('_datetime') revision = Revision(revisions, revision).run() + # Prevent too old revision in form view + if (self.screen.current_view.view_type == 'form' + and revision < revisions[-1][0]): + revision = revisions[-1][0] if revision != self.screen.context.get('_datetime'): self.screen.clear() # Update root group context that will be propagated