From b34ea0844f30c47763c93e968e715dc552f85bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 15 Jan 2017 19:05:15 +0100 Subject: [PATCH] Use save_current of Window.Form in Window.Search It prevents the new form from closing when an error message is raised. issue5609 review26011002 --- src/window.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/window.js b/src/window.js index 5c73b96098..1ad3491f5e 100644 --- a/src/window.js +++ b/src/window.js @@ -548,13 +548,9 @@ var callback = function(result) { if (result) { - screen.save_current().then(function() { - var record = screen.current_record; - this.callback([[record.id, - record._values.rec_name || '']]); - }.bind(this), function() { - this.callback(null); - }.bind(this)); + var record = screen.current_record; + this.callback([[record.id, + record._values.rec_name || '']]); } else { this.callback(null); } @@ -562,6 +558,7 @@ this.el.modal('hide'); new Sao.Window.Form(screen, callback.bind(this), { new_: true, + save_current: true, title: this.title }); return;