Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
2544 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

I think it should be done some like this:

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


Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
лип. 24
2963
2
трав. 24
2373
1
груд. 23
2823
1
черв. 24
1610
1
трав. 24
2110