İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2313 Görünümler

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?

Avatar
Vazgeç
En İyi Yanıt

I think it should be done some like this:

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


Avatar
Vazgeç
En İyi Yanıt

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.

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Tem 24
2690
2
May 24
2204
1
Ara 23
2634
1
Haz 24
1461
1
May 24
1962