From 1808b91594d571bcf888753fa601ae06da1611c9 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 30 Jul 2022 13:19:53 +0200 Subject: [PATCH] [FIX] web_widget_one2many_product_picker: Don't apply limit on name_search Steps to reproduce the problem: - Have more than 100 products. - On the "All" group, click "Search more..." until no more records are fetched Current behavior: Only 100 records are shown Expected behavior: You see more than the 100 records The problem comes from the call to `name_search` always populating the default limit parameter (100). TT38163 --- .../static/src/js/views/basic_model.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_widget_one2many_product_picker/static/src/js/views/basic_model.js b/web_widget_one2many_product_picker/static/src/js/views/basic_model.js index d1e33c810..bf48def93 100644 --- a/web_widget_one2many_product_picker/static/src/js/views/basic_model.js +++ b/web_widget_one2many_product_picker/static/src/js/views/basic_model.js @@ -500,7 +500,9 @@ odoo.define("web_widget_one2many_product_picker.BasicModel", function(require) { name: search_val, args: domain || [], operator: operator || "ilike", - limit: this.limit, + // The limit will be applied later on the read + // TODO: Look to replace this with a direct search_read in one step + limit: 999999, context: context || {}, }, }).then(function(results) {