[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
pull/2264/head
Pedro M. Baeza 2022-07-30 13:19:53 +02:00
parent 8e9051d849
commit 1808b91594
1 changed files with 3 additions and 1 deletions

View File

@ -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) {