From b7d7d98d356fc804ee38f4cc3a616040eca7d057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=ADaz?= Date: Tue, 19 May 2020 10:37:23 +0200 Subject: [PATCH] [FIX] web_advanced_search: Change management of relational fields --- web_advanced_search/static/src/js/web_advanced_search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_advanced_search/static/src/js/web_advanced_search.js b/web_advanced_search/static/src/js/web_advanced_search.js index b5df59d42..72b0e8c51 100644 --- a/web_advanced_search/static/src/js/web_advanced_search.js +++ b/web_advanced_search/static/src/js/web_advanced_search.js @@ -168,8 +168,8 @@ odoo.define("web_advanced_search", function(require) { // Create dummy record with only the field the user is searching const params = { fieldNames: [this.field.name], - modelName: this.dataset.model, - context: this.dataset.context, + modelName: this.field.relation, + context: this.field.context, type: "record", viewType: "default", fieldsInfo: { @@ -203,7 +203,7 @@ odoo.define("web_advanced_search", function(require) { start: function() { const result = this._super.apply(this, arguments); // Render the initial widget - result.done($.proxy(this, "show_inputs", $(""))); + result.then($.proxy(this, "show_inputs", $(""))); return result; },