Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
2274 Tampilan

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
Buang
Jawaban Terbai

I think it should be done some like this:

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


Avatar
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
2
Jul 24
2665
2
Mei 24
2191
1
Des 23
2618
1
Jun 24
1453
1
Mei 24
1954