Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2285 Näkymät

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
Hylkää
Paras vastaus

I think it should be done some like this:

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


Avatar
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
heinäk. 24
2670
2
toukok. 24
2195
1
jouluk. 23
2622
1
kesäk. 24
1453
1
toukok. 24
1954