Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
2329 Vistas

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
Mejor respuesta

I think it should be done some like this:

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


Avatar
Descartar
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 24
2708
2
may 24
2209
1
dic 23
2644
1
jun 24
1475
1
may 24
1978