跳至內容
選單
此問題已被標幟
2 回覆
2293 瀏覽次數

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
7月 24
2671
2
5月 24
2197
1
12月 23
2625
1
6月 24
1456
1
5月 24
1955