pycharm-odoo icon indicating copy to clipboard operation
pycharm-odoo copied to clipboard

Support OCA components

Open trinhanhngoc opened this issue 2 years ago • 4 comments

Just discovered this stuff through the talk Patterns and antipatterns in Odoo module development in Odoo Experience 2022 and the article https://dev.to/guewen/introduction-to-odoo-components-bn0.

trinhanhngoc avatar Oct 17 '22 10:10 trinhanhngoc

Nice article :herb:

Ngquang avatar Nov 18 '22 07:11 Ngquang

My only regret is that "Introduction to Odoo Components" article is not detailed enough. I would love to read more and have more info and examples. Also it leaves you hanging after talking about Connectors but not giving any insight.

jcfernandez-890825 avatar Nov 18 '22 12:11 jcfernandez-890825

Hi @jcfernandez-890825

That talk was the first time I heard about the Odoo Components. Regarding the article, I think it would be better if the author first gives a specific problem and solves it using two different ways: (1) using AbstractModel (2) using Component. Finally, compare the code of the two ways and point out the better points of using Component.

trinhanhngoc avatar Nov 18 '22 14:11 trinhanhngoc

Should you, me or anyone else find related info worth mentioning, he/she should leave the link here. I think this approach would improve our code by removing methods and stuff to avoid bloated models. A lot of functionality in Odoo should be implemented by composition rather than inheritance, this approach gives us tools to do so IMHO.

jcfernandez-890825 avatar Nov 18 '22 14:11 jcfernandez-890825