Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2298 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

I think it should be done some like this:

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


Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lip 24
2675
2
maj 24
2199
1
gru 23
2628
1
cze 24
1459
1
maj 24
1957