Odoo & ERP

How We Build Custom Odoo Modules Without Touching Core

A practical approach to building maintainable Odoo custom modules using model inheritance, XML view inheritance, isolated integrations, security rules, and upgrade-safe architecture.

SlantFlow Back to insights ↗

Why We Avoid Editing Odoo Core

Direct changes to Odoo core files may feel faster in the short term, but they create problems during upgrades, debugging, deployment, and maintenance.
A production ERP should be extendable without depending on manual patches to the framework itself.

Our preferred approach is to keep business-specific logic inside independent custom modules.
This gives us a predictable upgrade path, cleaner deployments, and a much easier way to identify where custom behavior comes from.

Start With the Business Workflow

Before creating models or overriding methods, we map the actual workflow:
what users do, what data is required, which standard Odoo modules already cover the process, and where custom behavior is genuinely needed.

The goal is not to replace standard Odoo behavior unnecessarily.
We use native modules and extension points where possible, then add custom modules only for business-specific requirements.

Typical Module Structure

custom_module/
├── __init__.py
├── __manifest__.py
├── models/
├── views/
├── security/
├── data/
├── report/
└── static/

Keeping models, security rules, views, reports, and data files separated makes the module easier to maintain and review.
It also keeps implementation details isolated from Odoo core.

Extend Models Instead of Replacing Them

Odoo’s inheritance model allows us to extend existing models without modifying their source files.
For example, a sales workflow can add new fields and business logic to sale.order while preserving the standard application.

from odoo import fields, models


class SaleOrder(models.Model):
    _inherit = "sale.order"

    external_reference = fields.Char(
        string="External Reference"
    )

The same approach applies to purchases, inventory, accounting, CRM, and custom business models.

Use XML Inheritance for Views

We also avoid copying complete standard views when a small inherited view is enough.
XPath-based inheritance lets us add or modify specific elements while keeping the original view managed by Odoo.

<record id="sale_order_form_extension" model="ir.ui.view">
    <field name="name">sale.order.form.extension</field>
    <field name="model">sale.order</field>
    <field name="inherit_id" ref="sale.view_order_form"/>

    <field name="arch" type="xml">
        <xpath expr="//field[@name='client_order_ref']" position="after">
            <field name="external_reference"/>
        </xpath>
    </field>
</record>

Keep Business Logic in the Right Layer

A maintainable Odoo implementation separates user-interface changes from business rules.
Critical validation should not exist only in JavaScript or form views.
If a rule must always apply, it belongs in the model layer.

Common examples include:

  • Workflow state validation
  • Stock and warehouse rules
  • Purchase and supplier constraints
  • Approval logic
  • Accounting checks
  • Integration status handling

Integrations Should Be Isolated Too

External APIs should not be scattered across unrelated models.
We normally isolate provider-specific communication into service classes or dedicated integration modules.

That makes it easier to manage:

  • Authentication
  • Retries
  • Timeouts
  • Logging
  • Webhook processing
  • Error handling
  • Provider changes

Security Is Part of the Module

Custom modules should include their own access control and record rules.
A feature is not complete just because the menu and form work for the administrator.

We define access rights intentionally for each model and user group instead of relying on broad permissions.

Reports Need the Same Isolation

Custom quotations, invoices, purchase documents, and operational reports should also live inside independent modules.
This is especially important when reports include bilingual layouts, custom paper formats, or business-specific fields.

Why This Matters During Upgrades

When core files remain untouched, version upgrades become significantly easier to reason about.
Instead of comparing a modified Odoo installation against the new release, we can review the custom modules independently and adapt only the extensions that are affected.

This is particularly important for long-lived ERP systems where upgrades, integrations, and new workflows continue after the initial implementation.

Our Rule

If a requirement can be implemented using Odoo’s standard extension mechanisms, we use them.
Core modifications are treated as a last resort, not a normal development technique.

That approach keeps the ERP maintainable, easier to deploy, and safer to evolve as the business changes.

If you are planning an Odoo implementation, migration, or custom module project,
view our Odoo ERP services
or review selected case studies.

HAVE A PROJECT?

Need something like this built?

Tell us about your workflow, system, integration, or production challenge.