Migrating Puro.earth
from Odoo 15 to
Odoo 18 Enterprise

  • Industry: Carbon Removal & Sustainability
  • Services Provided: Odoo Migration, Custom API Integration, Performance Optimization
  • Technology Stack: Odoo 15 → Odoo 18 Enterprise, PostgreSQL, Python, RESTful APIs
  • Duration: 12 Weeks

About
Puro.earth

Puro.earth is a leading carbon removal marketplace dedicated to helping organizations achieve Net Zero targets through science-based, verifiable carbon removal credits. As the demand for climate accountability grew, so did the need for a robust, future-ready ERP system to support partner onboarding, credit transactions, and registry automation.

Project
Objective

To seamlessly migrate the existing Odoo 15 instance to Odoo 18 Enterprise while preserving:

100% of business-critical data

Custom API integrations for the Puro Registry

Fine-grained partner access control

Portal usability for external partners

Registry logic involving carbon credit issuance and transactions

Automated workflows and audit logs

The goal was not just to upgrade, but to future-proof the platform for growth, scale, and enhanced performance.

KEY
CHALLENGE

1. API Compatibility: Puro’s external-facing API endpoints under /mypuro/api/ had strict backward compatibility requirements with third-party carbon accounting platforms.

2. Large Data Volumes: Multiple years of transactional and registry data with interlinked models like puroapi.transaction, puroapi.account, and res.partner.

3. Custom Security & Scopes: Complex rules such as partner-level scoped access (e.g., “View Inventory”) via API keys, requiring fine ACL migration.

4. Registry Rules Engine: Business logic for credit issuance, revocation, and transfers needed to be preserved with zero downtime.

5. Performance Optimization: Certain endpoints were slow due to inefficient domain filters and relational lookups.

OUR
SOLUTION

1. Pre-Migration Planning

  • Conducted a full model mapping and module audit using odoo-upgrade-tools.
  • Identified deprecated methods and potential conflicts with custom modules.
  • Created a staging environment for dry-run testing.

2. Database Migration

  • Used OpenUpgrade as a base with custom patching for proprietary modules.
  • Preserved relational integrity across models such as account_holder, transaction, credit, and certificate, etc.

3. Custom API Compatibility Layer

  • Refactored controllers like /mypuro/api/account-holders, /transactions, /registry, etc to Odoo 18’s HTTP controller standards.
  • Maintained schema consistency and OAuth+API-key validation logic.

4. Security Layer Enhancements

  • Rebuilt the API key access system using scoped tokens (e.g., VIEW_INVENTORY, CREATE_CREDIT) tied to res.users.
  • Extended _get_portal_api_allowed_account_holder_ids() for clean role-based access.

5. Optimizations & Refactoring

  • Rewrote search and pagination methods with SQL-like profiling.
  • Moved heavy operations to sudo() blocks with cache preloading and batch fetching.

6. Testing & Rollout

  • Implemented over 75 Pytest-style unit tests and API regression testing.
  • Rolled out in phases with zero downtime and full audit logging.

Impact
Delivered

40% Faster API Response Time

Zero Data Loss Across Models

Seamless Partner Experience – Existing API integrations kept intact

Scalable Foundation for future modules like Carbon Credit Auctions

Enhanced Registry Logic with better performance and maintainability

Lessons
Learned

Technologies
& Tools Used

Eastern Enterprise proposed the following technology to easily reach the requested functions

Odoo 18 Enterprise –
Core ERP

PostgreSQL 14 – High-volume data processing

Python 3.10 – Business logic
& API endpoints

Docker Compose – Isolated dev/staging environments

Pytest / Postman –
Automated testing

Sentry + Structured Logging – Error tracking and monitoring

Outcome

The migration ensured compatibility with future Odoo versions and established a robust foundation for scalable growth. Puro.earth’s backend is now equipped to support:
  • Future product launches through a modular, API-ready architecture
  • Investor-grade audit logging with secure, structured, and traceable data flows
  • Deeper integrations with carbon accounting tools using standardized interfaces and enhanced interoperability
This upgrade enables Puro.earth to scale confidently, innovate efficiently, and meet the evolving demands of the carbon removal industry.