Odoo custom module development

Custom Odoo modules add real functionality, but every one must be built, tested and ported at each upgrade. This page covers the decisions, build sequence, effort drivers and handover for Python modules.

On this page

When Odoo custom module development is the right answer

Custom module development is the right answer when a business process cannot be expressed through configuration, Odoo Studio or the apps you already plan to use. Typical signals are a calculation the standard models cannot hold, a approval chain tied to internal systems, or a reporting or screen layout that changes how the work is done. Before committing, confirm that the gap is real by testing the process against the standard app settings and against what Studio can add without code. A custom module is the last step on that ladder, not the first. It is a Python package that adds or changes models (the database structures), views (the screens and reports defined in XML), security rules (access groups and record rules), data files and tests. Each piece must be maintained alongside the core code it extends.

The effort is easy to underestimate because every custom module must be ported each time the platform moves to a new major version. Odoo's own support window for a major release is three years on standard support, and on Odoo Online and Odoo.sh major upgrades are mandatory every two years according to the upgrade documentation. A module that depends on internal method names or view structures can break at each upgrade, so the ongoing cost is the port, the regression tests and the time to retest business workflows. Ask any partner to estimate that recurring cost in writing, separately from the build.

Hosting also decides whether custom code is possible at all. According to Odoo's pricing page, only the Custom plan can be hosted on Odoo.sh or on-premise, and only the Custom plan includes custom modules. Confirm the current plan terms with Odoo before the design phase, because a Standard subscription on Odoo Online will not run your code. Decide the hosting model, the plan and the upgrade cadence together, then ask the implementation partner to show how each custom module will be tested and ported.

Which parts of an Odoo module you build and where they live

An Odoo module is a folder with a fixed layout, and each part has a single job. The manifest declares what the module depends on, Python defines data and behavior, and XML, CSV and security files define what users see and what they may touch. Reviewing these parts separately makes it easier to see where a custom module will break at the next upgrade.

Manifest file

The __manifest__.py file declares the module name, version, dependencies and the data files Odoo loads. Odoo only loads files listed in the manifest, so a view or security file that exists on disk but is not registered does nothing. The common mistake is listing a dependency too loosely, which lets the module load on a database where the core module it extends is missing or changed. Check that every inherited module appears in depends.

Odoo upgrade docs

Python models

Models in Python define the database tables, fields, computed values and business methods. Extending an existing model with inheritance, instead of copying it, keeps your code attached to the core logic that Odoo maintains. The common mistake is overriding a core method without calling the original, which silently drops behavior from the core and from other modules. Review each override for a call to super() and for the fields it adds.

XML views and actions

XML files define forms, lists, search views, menus and window actions. Inherited views use XPath expressions to insert or move elements in a core view. The common mistake is an XPath that matches one element in the version you tested and breaks or matches nothing after a core view changes during an upgrade. Keep inherited views short, and test each one after every core upgrade.

Access rights CSV

The ir.model.access.csv file grants create, read, write and delete permissions to security groups for each model. A model with no access line is not visible to ordinary users, which often surprises teams during testing. The common mistake is granting write or delete to a broad group by copying a line from another model. Map each permission to a named group and document who is in it.

Record rules and groups

Record rules restrict which rows a group can see or change, for example only records in the user's company or only records they own. Security groups are defined in XML and referenced by access rights and rules. The common mistake is relying on menu hiding or view settings to protect data, which does not stop access through the API or a direct URL. Test each rule with a user from each group, not only with an administrator.

Data, demo and tests

Data files load required reference values such as sequences and configuration, while demo files load sample records that should only exist on test databases. Automated tests check model behavior and access rules before release. The common mistake is putting demo records in the data section, which loads them into production, or shipping a module with no tests, leaving the next upgrade to find regressions. Confirm which files are loaded in production and keep the test suite running on every upgraded test database.

Inherit, extend or build new: which module pattern to choose

This table compares the main ways to change Odoo behavior: a new standalone module, inheriting a core model, extending views, adding a third-party module, and configuration or Odoo Studio. Read each row for when the pattern fits and what it costs to keep through future version upgrades. The main takeaway is that the smaller and more standard the change, the less porting work each upgrade will require.

PatternWhen it fitsOperational costPlan or licensing check
Configuration and settingsBehavior the standard app already exposes through settings, fields or access rightsLow. Settings survive upgrades, though new versions can rename or move optionsConfirm the features you need exist in your edition and plan
Odoo Studio customizationAdding simple fields, views or report tweaks without writing PythonLow to moderate. Studio changes are stored in the database and must be checked after each upgradeConfirm Studio is included in your plan before design starts
Inheriting a core model with _inheritAdding fields or methods to an existing model while keeping core logic intactModerate. Overridden methods depend on core internals that can change between versionsCustom modules require a plan that allows them, such as Custom, as stated on the pricing page
Extending a view with inherited viewsAdding, moving or hiding fields on an existing form, list or search viewModerate. XPath expressions break when core view structure changes, so each upgrade needs a view checkSame custom module requirement applies
New standalone moduleA new business object, process or report with little overlap with core modelsModerate to high. You own all code, tests and security rules for the life of the moduleRequires a plan that allows custom modules and a deployment target you control
Third-party moduleA capability already built and maintained by another publisherVaries. Depends on that publisher's release cadence and whether it has a version for your target Odoo versionReview the license and the publisher's support terms before installation

How inheritance keeps core modules upgradable

The way you inherit core Odoo models and views decides how much work each version upgrade costs. A custom module that extends a core model with a few well-placed fields and methods can usually be ported in a short review. A module that copies core files or rewrites core methods has to be re-analyzed line by line every time the core moves. The rule to set before the first line of code is minimal overrides: inherit the model with _inherit, add only the fields and methods the business case needs, and leave everything else to the core. Where a method must change behavior, call super() first or wrap its result, so the core logic still runs and any fix Odoo ships to that logic reaches your database without a patch. Never copy a core file into your module to edit it in place, because the copy freezes the old code and silently drops later bug fixes and security corrections.

Field and view changes need the same discipline. Add new fields rather than changing the type, size, or meaning of existing ones, and extend views with XML inheritance using xpath or position against stable anchors, not by replacing the whole view. Additive changes tend to survive an upgrade, while removed or renamed fields, and view elements that were moved, cause the upgraded test database to fail in ways that take time to diagnose. Before you commit to a design, confirm with your upgrade partner or the version notes for your target release which core methods and view IDs are documented as stable, because not every internal method carries the same promise. Ask for a list of every core model and view your module touches as part of the code review.

Document each override where a reviewer and a future upgrade team will find it. A short docstring or comment on each inherited model should state the core class and method being changed, the business reason, and whether the change calls super() or replaces behavior. Keep a register of overrides in the module's README or design notes, with the core version it was built against. This register is the first thing a porting team reads when a new version arrives, and it determines whether an upgrade is a review of a few known points or a search through the whole codebase. Treat any override without a documented reason as a defect in the review, not a style issue.

How to build a custom module from scaffold to tested release

This sequence takes a custom Odoo module from a confirmed requirement to a reviewed package that installs cleanly, upgrades on a copy of the client's data and passes its tests. Each step ends with a check the team can record before moving on.

  1. Confirm the requirement against edition and plan

    Before any code is written, the team checks that the requirement cannot be met with configuration or Odoo Studio, and that the chosen edition and hosting allow custom modules. Per Odoo's pricing page, only the Custom plan can be hosted on Odoo.sh or on-premise and includes custom modules, so a Standard or Online deployment will not run this work. The owner signs off a short written requirement listing the business rule, the users affected and the target Odoo version. Done when the edition, hosting and target version are written down and approved.

  2. Scaffold the module and its manifest

    A developer creates the module skeleton with the standard folder layout and a manifest file that declares the module name, version, dependencies and data files. Dependencies should list only the core modules the feature truly uses, because every extra dependency adds upgrade work later. Done when the module installs on an empty test database with no errors in the server log, which confirms the manifest and dependency chain are valid.

  3. Define models and access rights

    The developer defines the Python models, fields and constraints that hold the new business data, and writes the access control list that grants each group read, write, create or delete rights on each model. Inheriting an existing core model should use inheritance hooks rather than editing core files, which keeps the module portable across versions. Done when a test user in each group can perform exactly the operations the requirement allows and no others, checked by a reviewer against the access list.

  4. Build views, actions and menus

    The developer adds form, list and search views, window actions and menu entries, extending core views by XML inheritance where possible. Field visibility and button conditions are set in the views, but they are a usability layer only and do not enforce security. Done when a reviewer walks each menu path as each group and confirms the screens load, the expected buttons appear and no view raises an error on the server or in the browser console.

  5. Add record rules for data isolation

    Where users should only see some records, such as their own company, branch or department, the developer writes record rules with domain expressions and tests them across companies or groups. Record rules apply on top of access rights and are the control that stops a user from reading another team's data through a direct URL or API call. Done when a tester logged in as a restricted user confirms they cannot open, search or export records outside their domain, and the result is recorded in the test notes.

  6. Write automated tests

    The developer writes unit and tests that create records, run the business methods, check constraints and verify that access rules block forbidden actions. Tests should cover the upgrade-sensitive logic and the security rules, not only the happy path. Done when the test run completes with zero failures on the empty database and the results are saved with the build, so later changes can be compared against this baseline.

  7. Run the module against a copy of the database

    The team restores a copy of the client's production database, neutralizes it so no outbound emails, payments or scheduled actions reach real parties, installs or upgrades the module on that copy, and reviews the data for errors. Odoo documents database duplication with neutralization for test copies, and an upgrade run should be repeated on each target version. Done when the install or upgrade completes without errors, existing records remain intact, and the test sign-off lists any issues found and fixed.

  8. Package the module for review

    The developer packages the module with a changelog, a README that states the target Odoo version and dependencies, the test results and a list of every core model or view it inherits. A second developer reviews the code for security rules, hard-coded values, performance risks and third-party dependencies before the package is approved for release. Done when the reviewer signs off the review checklist and the package is tagged in version control, ready for deployment to the production environment.

How to test that a custom module works and fails safely

Testing an Odoo custom module has two goals: prove the module does what its specification says, and prove that when it misbehaves, production is not the place where the damage shows up. Start with the module's tests folder. Unit tests should exercise model methods, computed fields and constraints on records created in code, while integration tests should drive the flows that cross modules, such as a sale order that triggers a custom stock rule. Keep the __init__.py in tests importing every test file, or the tests will silently never run. Then install the module on an empty database to confirm its dependencies are declared correctly and that data files load in order. A module that works only because another module happened to be installed earlier has a hidden dependency that will break on a fresh install.

Access rights need a separate pass, because unit tests running as the superuser will pass even when a sales user cannot see the records the feature depends on. Create one test user per real role, assign the groups you expect, and log in as each one to walk the screens, buttons and reports. Confirm that record rules hide other companies' or other teams' records, that restricted actions return an access error rather than a blank screen, and that the module's own security file (ir.model.access.csv) grants no more than intended. Then install the module on a duplicated production copy. Odoo's database duplication can create a copy for this purpose, but the copy must be neutralized before anyone uses it, so that outgoing emails, scheduled actions, payment and connector settings do not reach real customers or systems. Confirm neutralization with your own checklist before testing.

Rehearse the upgrade the same way. Odoo's upgrade service moves a database to a newer version through an upgraded test database that you test before the production database is touched, and that separation is the model to copy: run the module's port and test on a copy, record what failed, and only then schedule the production change. Ask your team or partner to show that a failed upgrade rehearsal leaves production untouched, and that the rollback path, including restoring a backup, has been run at least once. Confirm with Odoo which upgrade options your edition and hosting allow, since the upgrade service requires an Enterprise subscription for on-premise use according to the Odoo upgrade documentation.

What drives the cost of porting modules at each upgrade

This table lists the factors that move the effort of moving custom Odoo code to each new major version, with a way to keep each one down. No effort figures are given here, so treat it as a checklist for scoping, and build any quote from the written scope.

DriverWhy it changes effortHow to keep it down
Number of custom modulesEach custom module is code that must be reviewed, ported and retested at every major version.Consolidate small modules, retire unused ones and confirm the list before each upgrade planning cycle.
Depth of core overridesOverrides of core model methods and views break when core code changes between versions.Prefer inheritance hooks and extension points over replacing core methods, and keep each override narrow.
Third-party modulesCommunity or partner modules must have a compatible version for the target release, or they need porting or replacement.Record each module's source, version and maintainer, and check target-version availability before committing to a path.
Odoo Studio customizationsStudio changes are stored as database customizations, so their behavior must be checked on the upgraded test database.Keep Studio changes few and documented, and list them in the upgrade test plan.
Data model changesNew fields, models or changed relations need migration scripts and may affect data already in production.Add fields with clear names, avoid changing existing field types and write migration scripts alongside the change.
IntegrationsExternal API consumers and scheduled syncs depend on field names, methods and authentication that may change.Document each integration's dependencies and add contract tests so breaking changes show up early.
Number of companies and usersMore companies and roles multiply record rules, access groups and test cases that must be rechecked.Use representative test accounts for each company and role, and test with copies of real data that are neutralized.
Test coverageWithout automated tests, every upgrade needs more manual regression work, which is often the largest cost.Write automated tests for custom business logic and key workflows, and run them on every version branch.

How a module moves from development to an upgraded production database

The path starts on a development branch and passes a code review before the module is installed on an empty database to check that it loads cleanly. It then runs on a neutralized production copy, where test data cannot reach real customers or send email. An upgrade rehearsal on the next supported version comes before production release. A module that fails review, install or rehearsal goes back for redesign, and each new major version restarts the porting loop.

Review and rehearsal gates a module must pass before production release.

How custom module work differs by plan and hosting

The Custom plan is the Odoo plan the pricing page lists as the one that can be hosted on Odoo.sh or on-premise, and it is the only plan that includes custom modules. On Odoo.sh, the platform hosts the environments and handles much of the operational layer, so the team's work centers on the code, its tests and the upgrade cycle. Confirm with Odoo which environment features, staging behavior and deployment steps apply to your project before you design the branch and release process.

  • Plan requirement: Custom modules are only included in the Custom plan, so confirm the plan covers every module you intend to build before design starts.
  • Upgrade service: Upgrades are handled through the upgrade service, which produces an upgraded test database that should be tested before production.
  • Mandatory major upgrades: Odoo documents that major version upgrades are mandatory every two years on Odoo Online and Odoo.sh, so budget for porting modules on that cycle.
  • Team responsibilities: Your team still owns the module code, its unit and integration tests, access rules and data changes made by custom logic.
  • Support boundaries: Confirm with Odoo which support and extended support options apply to your version and hosting type.

Before committing, ask the vendor to confirm the Odoo.sh environment and branch workflow, and ask your implementation partner how they will test every custom module against the upgraded test database.

Questions buyers ask before hiring help for Odoo custom modules

What drives the cost of an Odoo custom module, and is it one-time or recurring?

The cost is driven mainly by how much the module must do, how many existing views, models and workflows it touches, and how much testing and sign-off the business requires. The build itself is a one-time cost, but a custom module also carries a recurring cost because it must be reviewed, tested and ported each time Odoo moves to a new major version. Ask for a quote that separates the design and build, the automated tests, the documentation, the deployment to test and production, and a stated porting effort for future upgrades. Anything the quote leaves out, such as training or hosting, should be named so you can compare quotes fairly.

How long does building an Odoo custom module take, and why does it vary?

Duration depends on the number of business rules, the amount of core Odoo code the module must extend, and how quickly process owners can confirm decisions. A module that adds a few fields and a report to an existing form is far smaller than one that changes approval flows, security rules and integrations at once. Delays most often come from unclear requirements, late changes to rules, and waiting for test data or sign-off. Ask the provider to break the schedule into design, build, test and deployment phases, and to state the assumptions behind each phase so the timeline can be tracked against them.

Can our internal developers build Odoo custom modules without a partner?

Yes, if they have working knowledge of Python, the Odoo framework and PostgreSQL, and if someone on the team can review the code. Odoo modules combine Python models, XML views, access rules and tests, and inheriting core modules must be done carefully so that later upgrades do not break them. Teams often underestimate the review and testing work, not the coding. Before deciding, check whether the team can write automated tests, keep the module small, and maintain it through upgrades. A partner is most useful when the team lacks this experience or needs an independent code review.

What does the client need to provide for a custom module project?

The work depends on the client providing named process owners who can explain how the business actually runs, sample or test data that reflects real cases, and a clear sign-off owner for each stage. Without these, developers guess at rules, and the module is rebuilt after testing. Ask the provider to list the inputs it needs, the number of review rounds included, who approves the design before build, and who accepts the test results before production. Agree on these in the written scope so that delays are visible early.

How do Odoo upgrades change the cost of a custom module?

Each major version upgrade can require changes to custom code, because core models, views and methods may be renamed, moved or removed. Odoo on Odoo Online and Odoo.sh requires major version upgrades every two years, according to the Odoo upgrade documentation, so a module that is not kept small will be ported repeatedly. Odoo's standard support covers the first three years after a major release, so planning a module's upgrade path within that window keeps the work predictable. Ask for an estimate of porting effort per version and a test plan using an upgraded test database before production.

Can a custom module run on the Odoo Community edition?

Custom modules are an Enterprise-plan feature on Odoo's pricing page: only the Custom plan includes custom modules, and only the Custom plan can be hosted on Odoo.sh or on-premise. The Community edition is licensed under LGPL-3.0 and its source is public, so you can write and run your own Python modules on it, but you should confirm with Odoo which features and hosting options your edition and subscription allow. Also confirm that the upgrade service is available to you, since the documentation states the Community edition has no access to it. Check licensing terms with Odoo before committing to a design.

What should we check in a module before it reaches production?

Check that the module has automated tests for its business rules, that access rights and record rules limit each user group to the data it needs, and that the code inherits core models without overwriting them. Confirm that the module installs and upgrades cleanly on a copy of the production database, since Odoo documents database duplication with neutralization for test copies. Ask for a written code review covering security and upgrade risk, and confirm who maintains the module after go-live and how fixes are released.

How DeployOpen scopes, builds, hands over and supports Odoo modules

DeployOpen plans, implements, customizes, tests, documents and supports Odoo custom modules inside your own infrastructure, whether that is your cloud account, data center or air-gapped network. Each engagement starts from a written scope, so your team knows what gets built, tested and handed over before work begins.

How we scope

  • Confirm which requirements need a custom module and which can be met by configuration or existing apps
  • Record the Odoo version, edition and hosting target so the module is built for the platform you run
  • Agree in writing which core models and views will be inherited, and which will stay untouched
  • Define acceptance tests, deliverables and timelines in the fixed-scope agreement before development starts

How we build

  • Write Python models, views, menu items and access rules, with record rules where data must be restricted by user or company
  • Inherit core modules through extension points rather than copying core code, so the module stays separate from upgrades
  • Write automated tests covering business logic, security rules and the upgrade-sensitive parts of the code
  • Review each change against your coding standards before it is merged into the release branch

How we hand over

  • Deliver the module source with installation steps, dependency list and a record of the core versions it was tested against
  • Document the security groups, access rules and configuration keys so your administrators can review them
  • Run the test suite on a duplicated test database, with personal data neutralized, before production sign-off
  • Walk your technical team through the code structure, the test results and the known limits of the module

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after go-live
  • Estimate the porting effort for each future Odoo major version as part of the retainer scope, so upgrade costs stay visible
  • Retest the module on each upgraded test database before it moves to production, and update the documentation with the changes

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.