From 7f40e29c73fc711dacc6923ebff984b8b7b1079c Mon Sep 17 00:00:00 2001 From: Mohamed Eltayar <152964073+maltayyar2@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:16:06 +0300 Subject: [PATCH] Remove record limit - search all records without restrictions --- .../static/src/js/list_search.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/odex25_base/fims_general_search_tree_view/static/src/js/list_search.js b/odex25_base/fims_general_search_tree_view/static/src/js/list_search.js index 97509b988..73f3c48d2 100644 --- a/odex25_base/fims_general_search_tree_view/static/src/js/list_search.js +++ b/odex25_base/fims_general_search_tree_view/static/src/js/list_search.js @@ -119,14 +119,14 @@ odoo.define('fims_general_search_tree_view.list_search', function (require) { // Get only visible and stored fields to avoid computed fields issues var fieldsToRead = this._getFieldsToRead(); - // Perform RPC search with specific fields only + // Perform RPC search with specific fields only - NO LIMIT this._rpc({ model: model, method: 'search_read', args: [domain], kwargs: { fields: fieldsToRead, // Only read necessary fields - limit: 200, // Reasonable limit for performance + limit: false, // No limit - get all records offset: 0, context: this.state.context || session.user_context, order: this.state.orderedBy ? this.state.orderedBy[0].name : false @@ -294,8 +294,9 @@ odoo.define('fims_general_search_tree_view.list_search', function (require) { if (count > 0) { var message = _t('Found: ') + count + _t(' records'); - if (count >= 200) { - message += ' ' + _t('(showing first 200)'); + // Show warning if too many records + if (count > 1000) { + message += ' ' + _t('(Large result set, may affect performance)'); } $countEl.text(message).show();