From 34252e0a710b86dffb306e98ab135a5cffc4cdb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 1 Aug 2013 15:57:56 +0200 Subject: [PATCH] Refactore test_modified in sig_reload to use modified_save review992002 --- tryton/gui/window/form.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index 5327df5bea..14685b9b3a 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -345,14 +345,7 @@ class Form(SignalEvent, TabContent): def sig_reload(self, test_modified=True): if not hasattr(self, 'screen'): return False - if test_modified and self.screen.modified(): - res = sur_3b(_('This record has been modified\n' - 'do you want to save it ?')) - if res == 'ok': - self.sig_save(None) - elif res == 'ko': - pass - else: + if test_modified and not self.modified_save(): return False self.screen.cancel_current() set_cursor = False