コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
11425 ビュー

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

アバター
破棄
最善の回答

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

アバター
破棄
最善の回答

Hi,

You can also refer the following article.

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

Regards

アバター
破棄
関連投稿 返信 ビュー 活動
0
10月 22
571
0
12月 20
3762
1
1月 25
2636
1
11月 24
2077
0
3月 21
4460