Skip to content

Commit 9a9bd99

Browse files
antespidsolanki-initos
authored andcommitted
Limit name_search to 160 like Odoo core does
1 parent 75c4cd4 commit 9a9bd99

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

web_m2x_options/__openerp__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": 'web_m2x_options',
5-
"version": "8.0.0.2",
5+
"version": "8.0.0.2.0",
66
"depends": [
77
'base',
88
'web',

web_m2x_options/static/src/js/form.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,12 @@ openerp.web_m2x_options = function (instance) {
155155
values.push({
156156
label: _t("Search More..."),
157157
action: function () {
158+
// limit = 80 for improving performance, similar
159+
// to Odoo implementation here:
160+
// https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
158161
dataset.name_search(
159162
search_val, self.build_domain(),
160-
'ilike', false).done(function (data) {
163+
'ilike', 80).done(function (data) {
161164
self._search_create_popup("search", data);
162165
});
163166
},
@@ -301,7 +304,10 @@ openerp.web_m2x_options = function (instance) {
301304
values.push({
302305
label: _t("Search More..."),
303306
action: function() {
304-
dataset.name_search(search_val, self.build_domain(), 'ilike', false).done(function(data) {
307+
// limit = 80 for improving performance, similar
308+
// to Odoo implementation here:
309+
// https://github.com/odoo/odoo/commit/8c3cdce539d87775b59b3f2d5ceb433f995821bf
310+
dataset.name_search(search_val, self.build_domain(), 'ilike', 80).done(function(data) {
305311
self._search_create_popup("search", data);
306312
});
307313
},

0 commit comments

Comments
 (0)