跳至内容
菜单
此问题已终结
2 回复
11199 查看

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

形象
丢弃
相关帖文 回复 查看 活动
0
10月 22
571
0
12月 20
3586
1
1月 25
2419
1
11月 24
1706
0
3月 21
4247