[IMP] website_links: performance on search_read
The widget Selectbo was performing a search_read on every field while only using the fields id and name. This search_read has become very costly in the latest version due to some new fields. We now limit the search_read to the useful fields. closes odoo/odoo#45707 X-original-commit: a4832ccdeedd777b43825e41ffb8c20937022279 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit is contained in:
@@ -31,6 +31,9 @@ var SelectBox = publicWidget.Widget.extend({
|
||||
defs.push(this._rpc({
|
||||
model: this.obj,
|
||||
method: 'search_read',
|
||||
params: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
}).then(function (result) {
|
||||
self.objects = _.map(result, function (val) {
|
||||
return {id: val.id, text: val.name};
|
||||
|
||||
Reference in New Issue
Block a user