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

in the documentation, it was just mentioned as a passing remark

https://www.odoo.com/documentation/17.0/developer/reference/frontend/javascript_reference.html#patching-classes

But is there any example I can refer to?

アバター
破棄
最善の回答

I think it should be done some like this:

patch(ClassToPatch, {
components: {
​...(ClassToPatch.components || {}),
​Dropdown,
​DropdownItem,
​}
})


アバター
破棄
最善の回答

Hi,

Please refer to the following blog for an understanding the working of patching, with example:


https://www.cybrosys.com/blog/how-to-patch-existing-owl-component-in-odoo-17


Hope it helps.

アバター
破棄
関連投稿 返信 ビュー 活動
2
7月 24
2667
2
5月 24
2193
1
12月 23
2618
1
6月 24
1453
1
5月 24
1954