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:
+4
-7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user