pycharm-odoo
pycharm-odoo copied to clipboard
Support OCA components
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.
Nice article :herb:
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.
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
.
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.