Use save_current of Window.Form in Window.Search

It prevents the new form from closing when an error message is raised.

issue5609
review26011002
This commit is contained in:
Cédric Krier
2017-01-15 19:05:15 +01:00
parent fd5e118c1b
commit b34ea0844f
+4 -7
View File
@@ -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;