Skip to Content
Menu
This question has been flagged
2 Replies
2309 Rodiniai

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?

Portretas
Atmesti
Best Answer

I think it should be done some like this:

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


Portretas
Atmesti
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.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
liep. 24
2685
2
geg. 24
2202
1
gruod. 23
2631
1
birž. 24
1461
1
geg. 24
1960