Skip to Content
Menú
This question has been flagged
2 Respostes
2317 Vistes

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
Descartar
Best Answer

I think it should be done some like this:

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


Avatar
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
2
de jul. 24
2696
2
de maig 24
2207
1
de des. 23
2634
1
de juny 24
1464
1
de maig 24
1963