Skip to Content
Menu
This question has been flagged
2 Replies
2307 Views

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

I think it should be done some like this:

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


Avatar
Discard
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
Discard
Related Posts Replies Views Activity
2
Jul 24
2685
2
May 24
2200
1
Dec 23
2631
1
Jun 24
1461
1
May 24
1960