Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
2397 Prikazi

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

I think it should be done some like this:

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


Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
jul. 24
2773
2
maj 24
2236
1
dec. 23
2687
1
jun. 24
1513
1
maj 24
2018