Skip to content
Mahgoub

A Software Developer who does not let his schooling interfere with his education

Mahgoub

A Software Developer who does not let his schooling interfere with his education

Taming the Legacy Beast: Setting Up an Odoo 10 Development Environment

mmahgoub, December 14, 2023February 20, 2024

Dealing with legacy code always adds an interesting twist to the development process. Over the past few days, I’ve embarked on setting up a development environment for a legacy Odoo 10 modules codebase (mind you, Odoo 17 is already out as I write this). Let me tell you, it’s been quite an ordeal!

Here are the challenges I faced:

Python 2.7 Compatibility

Odoo 10 operates on Python 2.7, which significantly impacts package installations via PIP. Most packages either outright reject installation due to “unsupported” versions or clash with other necessary packages. Precise version numbering becomes critical in this scenario.

Compatibility with arm64 Architecture

Installing old packages in the .Dockerfile posed a significant hurdle due to their incompatibility with my arm64 architecture. While some Debian packages catered to this architecture, not all did. To resolve this, I activated Docker Desktop’s ‘Use Rosetta x86/amd64 emulation for Apple Silicon’ feature and added ‘–platform=linux/amd64’ to the ‘FROM’ section at the top of the .Dockerfile.

Custom Module Dependencies

Certain custom modules required additional PIP packages like Numpy, Pandas, etc. Integrating these posed a challenge because simply adding a ‘RUN pip install whatever’ line in the .Dockerfile wasn’t sufficient to install them in the correct location for Odoo to recognize. I initially attempted setting up a virtual environment for Odoo 10, but found it unnecessary. Instead, ensuring that the installation commands are executed by the same Linux user as the Odoo 10 installation proved effective.

Connecting Odoo 10 to Postgres

Establishing a connection between Odoo 10 and an existing Postgres database mandates that the database username used for connection matches the OWNER of the database. If not, altering the database owner using ‘ALTER DATABASE db_name OWNER TO new_owner_name;’ resolves the issue.

In conclusion, this endeavor not only enhanced my understanding of Odoo 10 but also deepened my knowledge of Docker. For those interested, the Dockerfile is accessible on GitHub at https://github.com/mmahgoub/docker-odoo10

Articles Blog DockerOdoo

Post navigation

Previous post
Next post

Related Posts

Blog Software Developer path diagram

Embarking on My Cloud Certification Journey

October 9, 2023February 20, 2024

Today I am marking the start of my journey towards AWS cloud certification. With determination and enthusiasm, I’m ready to explore cloud computing. My first goal is to conquer the AWS Cloud Practitioner certification, a milestone many say takes three months of dedicated study. However, I’m setting my sights on…

Read More

Dear VS Code Copilot please stop messing keyboard bindings

November 14, 2023February 20, 2024

As a devoted user of VS Code, I’ve found the Copilot extension incredibly helpful in navigating complex coding tasks. Recently, however, I encountered a situation where the adjustment of essential keyboard shortcuts like Command+. and Command+I impacted my workflow. These shortcuts are instrumental in swiftly resolving code issues and accessing…

Read More

إن طابت النفوس وسع المكان

September 8, 2023February 20, 2024

أو كما نقول باللهجة السودانية لو النفوس اطايبت بتشيلنا

Read More
©2026 Mahgoub | WordPress Theme by SuperbThemes