changeset fe2a9a26fec4 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=fe2a9a26fec4
description:
Ensure to put search_value in URL
If the screen container or the domain parser are not yet ready to
compute the
search_value, we should ensure to use the initial search_value.
Otherwise sao
may trigger to open a new tab without the search_value because the URL
will be
set with an empty search.
issue8267
review281471002
diffstat:
src/screen.js | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 677d969d275b -r fe2a9a26fec4 src/screen.js
--- a/src/screen.js Wed May 01 22:20:52 2019 +0200
+++ b/src/screen.js Thu May 02 12:46:37 2019 +0200
@@ -1053,6 +1053,7 @@
domain = domain_parser.parse(search_string);
} else {
domain = this.attributes.search_value;
+ this.attributes.search_value = null;
}
if (set_text) {
this.screen_container.set_text(
@@ -1920,8 +1921,13 @@
var view_ids = this.views.map(
function(v) {return v.view_id;}).concat(this.view_ids);
if (this.current_view.view_type != 'form') {
- var search_string = this.screen_container.get_text();
- var search_value = this.domain_parser.parse(search_string);
+ var search_value;
+ if (this.attributes.search_value) {
+ search_value = this.attributes.search_value;
+ } else {
+ var search_string = this.screen_container.get_text();
+ search_value = this.domain_parser.parse(search_string);
+ }
if (!jQuery.isEmptyObject(search_value)) {
query_string.push(['search_value', dumps(search_value)]);
}