From 04ec79e93aa54295d726b510dace2476d11099c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 23 Dec 2020 21:26:32 +0100 Subject: [PATCH] Succeed when save modified is canceled on unique new record The reload does not set any current record so we can not compare ids. issue9936 review314991002 --- tryton/gui/window/form.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tryton/gui/window/form.py b/tryton/gui/window/form.py index 7eac644a2a..ddaea8933d 100644 --- a/tryton/gui/window/form.py +++ b/tryton/gui/window/form.py @@ -557,7 +557,10 @@ class Form(SignalEvent, TabContent): if value == 'ko': record_id = self.screen.current_record.id if self.sig_reload(test_modified=False): - return record_id == self.screen.current_record.id + if self.screen.current_record: + return record_id == self.screen.current_record.id + elif record_id < 0: + return True return False return True