Hi everyone,
I'm currently working on a project with Odoo 12 Community, and I would like to integrate OpenAI's API (e.g., to generate reports or summaries based on notes in models).
However, I'm facing a compatibility issue:
Odoo 12 uses Python 3.5, but the official openai Python library now requires Python 3.6 or higher.
Has anyone successfully used the OpenAI API with Odoo 12?
What would be the best approach to make it work?
-
Is there a way to upgrade Python in an Odoo 12 environment without breaking compatibility?
Any advice, examples, or best practices would be greatly appreciated!
Thanks in advance.
👋 Hi everyone,
Huge thanks to @Piyush H and @Desk Enterprise for your clear and helpful answers!
✅ I followed your advice and used direct HTTP requests with requests, which works perfectly with Odoo 12 (Python 3.5).
This approach is clean, effective, and fully compatible—no need to upgrade Python or use the official OpenAI library.
🔥 For anyone wondering: using the API directly without the openai package is a great workaround for legacy environments.
Thanks again and best of luck to all of you!
Amazigh