Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
11122 Vizualizări

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();
}

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

You can also refer the following article.

https://codingdodo.com/owl-in-odoo-14-extend-and-patch-existing-owl-components/

Regards

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
oct. 22
571
0
dec. 20
3519
1
ian. 25
2331
1
nov. 24
1595
0
mar. 21
4119