Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
2 Besvarelser
2283 Visninger

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
Kassér
Bedste svar

I think it should be done some like this:

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


Avatar
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
jul. 24
2670
2
maj 24
2195
1
dec. 23
2622
1
jun. 24
1453
1
maj 24
1954