Skip to Content
Menu
This question has been flagged
2 Replies
11452 Rodiniai

Hi,

I want to override the following js function in search bar(addons/web/static/src/js/control_panel/search_bar.js)


_selectSource(source) {
// Inactive sources are:
// - Selection sources
// - "no result" items
if (source.active) {
const labelValue = source.label || this.state.inputValue;
this.model.dispatch('addAutoCompletionValues', {
filterId: source.filterId,
value: "value" in source ? source.value : this._parseWithSource(labelValue, source),
label: labelValue,
operator: source.filterOperator || source.operator,
});
}
this._closeAutoComplete();
}

Portretas
Atmesti
Best Answer

You need to patching existing class. Look here: https://www.odoo.com/forum/help-1/how-to-patch-a-owl-class-in-past-we-use-include-to-patch-widget-178947

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
spal. 22
571
0
gruod. 20
3778
1
saus. 25
2669
1
lapkr. 24
2139
0
kov. 21
4479