Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
2334 Visualizzazioni

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
Abbandona
Risposta migliore

I think it should be done some like this:

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


Avatar
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
lug 24
2713
2
mag 24
2211
1
dic 23
2649
1
giu 24
1480
1
mag 24
1982