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

What is the main difference of both of these methods,are they both the same thing?

頭像
捨棄
最佳答案

Hi,

When extending in Js, instances from the parent class remain untouched, but instances from the new child class will have the extended features.


When you include, you are adding the new features to the prototype of the parent class.


Here is a link to the blog which explains in detail about their difference.

https://www.cybrosys.com/blog/what-is-the-difference-between-extend-and-include-in-odoo-16-javascript


Hope it helps

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
11月 22
1768
1
11月 22
1952
0
12月 20
58
1
3月 25
899
0
1月 22
2367