Why auditing Odoo custom code comes before any upgrade or handover
An audit of an inherited Odoo database tells you what must be ported, what can be dropped and what the upgrade or handover will involve, and it should happen before anyone quotes a schedule. The typical starting point is a database that has grown through custom modules, Studio changes made directly in the database, and overrides written by a developer who is no longer available to explain them. Without an inventory, the new team cannot tell which customizations still serve a purpose, which duplicate a feature Odoo already ships, and which will break when the standard code underneath them changes.
Teams need this audit in three situations: before a version upgrade, before a change of implementation partner, and when they take over self-hosted code, whether it runs on Odoo Community or Enterprise. Deadlines make the first case urgent. Under Odoo's standard support, the Odoo standard and extended support documentation sets the window for each major release, and security patches are only provided during that window. Odoo 17.0 standard support ended in September 2026, so a database still on that version has no vendor security patches. The Odoo upgrade documentation also states that major upgrades are mandatory every two years on Odoo Online and Odoo.sh, which means a handover date can be set by the platform rather than by your project plan.
Confirm three things before the audit begins: which Odoo version and edition the database runs, whether the subscription and hosting type still cover the target version, and who holds the source code and the Studio change history. Ask the outgoing team for the repositories, deployment scripts and any database copies they kept. An audit without those inputs can only describe the live system, and it will miss the reasons behind each change.
Which custom code patterns carry the most porting risk
Most Odoo upgrade failures trace back to a small set of coding patterns that depend on internals Odoo changes between versions. Auditors should read custom code with these patterns in mind, because each one turns a routine version change into a manual rewrite. The cards below describe what to search for in the codebase and why each pattern makes porting slower and less predictable.
Duplicated standard features
Custom modules often rebuild something Odoo already ships, such as a approval field, a report button or a stock rule. Search the inventory of custom fields, menus and models against the standard apps you run, and compare them with the features in your installed version. When the standard feature later gains the same capability, the custom copy keeps running alongside it and users see two versions of the same process. Ask the owner which parts were built because the standard feature did not exist at the time.
Overridden methods that skip super
A method override that does not call super() replaces the standard logic entirely, so any change Odoo makes to that method in a new release is silently bypassed. Search for overrides of core business methods such as confirmation, posting or validation, and check that each one calls the parent implementation and returns its result. Overrides that copy large blocks of the original method are the hardest to port, because the copied code no longer matches the upstream source.
Broad XPath view inheritance
View inheritance with XPath expressions that match generic elements, such as the first field tag or a class name used across many views, can attach to the wrong node after a view is restructured. Look for XPath selectors that do not name a specific field or name attribute, and for views that hide or move standard fields by position. Narrow selectors that target stable field names are cheaper to verify after each upgrade and fail more visibly when they no longer match.
Heavy Owl client patches
Patching existing Owl components or replacing whole templates in the web client ties custom code to the internal structure of each frontend release. Check how many assets bundles are extended, whether any component is replaced rather than extended, and whether the custom JavaScript has tests. Front-end changes in the backend often need the most rework after a major version, so an auditor should ask which screens depend on them and whether those screens are used daily.
Direct SQL and raw ORM access
Raw SQL queries and calls that bypass the ORM skip access rights, record rules, computed field logic and cache invalidation. They also read table and column names that Odoo may rename or restructure. Search for cr.execute, self.env.cr and uses of low-level methods that write directly to tables. Each occurrence should have a documented reason, a permission check and a test. Queries without any of these are the usual source of data corruption after an upgrade.
Reports tied to wkhtmltopdf layouts
Custom PDF reports that rely on fixed margins, page-specific headers or the external layout behavior of the PDF engine tend to break when the rendering tool, its version or the paper format changes. Review each custom QWeb report template, note which paper format and external layout it uses, and confirm whether the report was produced with Studio or code. Ask for a sample output of every customer-facing document, then compare the rendering on the target version before the upgrade is scheduled.
How audit depth changes with the handover situation
This table compares three audit depths, from a quick inventory to a full code and database review with a test coverage check. Read each row against your handover situation: a planned upgrade on a known codebase needs less than a change of partner where nobody remembers why changes were made. The main takeaway is that a shallow audit is cheap but leaves the riskiest unknowns in place.
| Audit depth | What it finds and what it leaves unknown | When it fits |
|---|---|---|
| Quick inventory only | Finds the list of custom modules, Studio changes, installed Apps Store and OCA modules, and their declared versions. Leaves unknown whether overrides break at upgrade, whether standard features were duplicated, and what data the code changes. | A small, recent codebase with a current developer who can answer questions, or an early scoping step before a deeper review is funded. |
| Full code and database review | Finds risky overrides of core methods, view changes that depend on standard layouts, duplicated standard features, hard-coded records and Studio fields that feed custom logic. Leaves unknown whether the test suite and the business rules still match how users work. | A planned major version upgrade or a change of partner where the code must be understood well enough to port it. |
| Review plus test coverage check | Finds everything in the full review and adds which behaviors are covered by automated tests, which are not, and whether tests pass on the target version. Leaves unknown runtime behavior under real data volumes and integrations that were never exercised in tests. | Regulated or high-value processes such as invoicing or payments, where the handover must prove behavior has not changed and a fixed porting effort needs evidence. |
| Effort to answer questions | Quick inventory answers what exists. Full review answers why it exists and what it breaks. Coverage check answers whether a change would be detected. | Confirm with any partner which of these questions their written scope will answer before work starts. |
How the audit runs from access to porting estimate
The audit moves from controlled access to a tested picture of what custom code exists, what it duplicates, and what it will cost to port to the target version. Each step closes with an output the client can check before the next one starts.
Confirm access and the target version
Before any code is read, the client grants read-only access to the source repository and a copy of the production database, and names the Odoo version to upgrade to or hand over on. The auditor checks that target version against the standard and extended support dates in Odoo's support documentation, since a version whose standard support has ended changes the porting plan. The auditor also confirms whether the organization holds an Enterprise subscription, because the upgrade service and Enterprise source code depend on it. The step closes with a written access record and a confirmed target version.
Create a neutralized test database
The auditor works from a duplicate of the database, never from production. Odoo's on-premise documentation describes database duplication with neutralization for test copies, which disables outgoing email, scheduled actions and payment or integration callbacks in the copy. The client confirms that the copy is isolated from live integrations and that personal data handling meets its own policy. The step closes when the duplicate opens cleanly on the current version and the auditor has recorded its exact version, module list and size.
Build the inventory of modules and Studio changes
The auditor lists every custom module in the repository, every third-party or OCA module installed, and every change made with Studio that is stored in the database. For each item, the record includes the declared license, the version it was written for, its dependencies and the models, views and reports it touches. Studio changes are recorded separately because they live in the database rather than in code. The step closes with an inventory document that the client can compare against what the team believes is installed.
Classify each customization by risk
Each inventory item is sorted by how it changes standard behavior: new models and fields, view inheritance, method overrides that call super, direct edits to core templates, and front-end patches to Owl components. Overrides of core methods and patched client-side components usually carry the highest porting effort, so they are reviewed line by line. The auditor notes which items depend on undocumented behavior or on a module no longer maintained. The step closes with a risk class for every item and a short list of items that need a decision from the business owner.
Map duplicated standard features
The auditor compares each custom feature with what the target version already provides, including standard apps, configuration options and modules available in the edition the client holds. A custom report or approval flow that repeats standard functionality is a candidate for removal, which reduces what has to be ported. Where a feature is only partly covered, the map records the gap. The step closes with a mapping table that marks each feature as kept, replaced by standard functionality or needing a decision.
Run the existing tests on the target version
The auditor installs the custom modules on a test copy of the target version, using the upgraded test database where the upgrade service applies, and runs any existing automated tests. Because test coverage is often thin in inherited code, the auditor also records which workflows were exercised manually and which failed to install or raised errors. Installation failures and deprecated calls are logged against the items that caused them. The step closes with a run report showing what installs, what passes, what fails and which workflows still lack any test.
Deliver the porting estimate
The auditor combines the risk classes, duplicate mapping and test results into a porting estimate that lists each item to keep, remove, rewrite or retest, with the reason. The estimate separates one-time porting work from ongoing maintenance and names the decisions the client must make, such as dropping a duplicated feature. The client should ask for the estimate to state its assumptions, the target version it assumes, and the items it treats as out of scope. The step closes with a signed-off document that the client can use to compare quotes from other partners or its own team.
How audit findings feed the porting decision
The audit starts with the inherited source and a copy of the database, since code and data together show what the instance actually does. The inventory lists every custom module and Studio change, and each item is then classified as keep, replace with a standard or OCA module, port, or remove. Those classifications roll up into a porting effort estimate, which the decision owner uses to make a go or no-go call on the upgrade. Check that every Studio change appears in the inventory, because Studio edits live in the database and not in the repository.
Audit inputs flow through classification into the upgrade go or no-go decision.
Audit focus for an upgrade versus a handover
A planned upgrade starts from a question about timing and porting cost. The audit must first prove which Odoo version the database runs today, which versions are still inside standard support, and how much custom code must change to reach the target. Odoo's standard support covers the first three years after a major release, and Odoo Online and Odoo.sh require major version upgrades every two years, so the deadline is often set by the platform, not by the business.
- Version gap: Confirm the current and target versions and the support end date for each, using Odoo's standard and extended support documentation.
- Porting hotspots: List overrides of methods, XPath view inheritance and Owl front-end patches, since these break most often across versions.
- Studio residue: Find Studio changes that will need to be rebuilt or reviewed against the new release.
- Dead custom code: Identify modules that duplicate standard features in the target version and can be removed instead of ported.
- Test baseline: Check whether existing tests run on a copy of the upgraded database before production.
Before approving the upgrade, check that the audit gives a per-module porting list, not only a total.
A handover to a new partner starts from a question about whether the code can be understood and supported without its original author. The audit must first prove what is installed, where it is deployed, and whether the source matches the running system. Many handover failures come from modules that exist only on a server, Studio customizations that no one has exported, or a database that has drifted from the repository.
- Source matches production: Compare the deployed modules with the version-controlled repository and record any differences.
- Ownership and licensing: Confirm which license each module declares and whether third-party or OCA code is mixed in, since that determines what the new partner may change and distribute.
- Credentials and access: Locate database, admin and subscription access, and confirm who holds the Enterprise subscription code for on-premise use.
- Undocumented overrides: Flag risky overrides of core behavior that no current document explains.
- Test copy: Confirm a neutralized database duplicate can be created for review, as Odoo documents for on-premise test copies.
Before accepting the handover, ask for a written inventory the new partner can verify on its own.
A return to in-house ownership starts from a question about whether the internal team can maintain the code after the partner leaves. The audit must first prove that the team can run the system without hidden dependencies, and that knowledge is written down rather than held by one person. The findings that matter most are those that will create recurring work for a small team, such as custom code that must be re-ported at every upgrade.
- Maintenance load: Estimate which custom modules will need porting at each upgrade cycle and whether the team has the skills to do it.
- Support boundaries: Separate what Odoo support covers from what the custom code adds, so the team knows which issues it owns.
- Operational runbooks: Check that backups, staging copies, updates and deployment steps are documented for the internal team.
- Reduction candidates: Mark Studio changes, third-party modules and duplicated features that can be retired to lower the ongoing burden.
- Skills gap: Compare the languages and frameworks used in the code with the skills the internal team already has.
Before moving to in-house ownership, confirm the audit leaves the team with a shorter, documented list of what it must maintain.
Security and access controls during an inherited code review
An inherited Odoo codebase is usually reviewed against a database that holds real customer, employee and financial records, and the people reviewing it may not all need that access. The cards below cover the operational controls that keep the audit copy, its credentials and its permissions under control while the code is examined.
Neutralize the audit database copy
Create the review copy from production with database duplication and neutralization, so outgoing mail servers, scheduled actions, payment and API connections are disabled in the copy. Confirm with your Odoo version's documentation which settings are neutralized and check the result, because custom modules may store integration settings that the standard process does not touch. Keep the copy in a separate environment from production, and record who created it and when. Illustrative: a copy that still sends invoice emails to customers is a production incident waiting to happen.
On-premise docsRestrict who can open the audit copy
Limit access to the audit copy to named reviewers, and do not give them production administrator rights just to run the code. Personal data in the copy stays personal data, so the access list should follow the same rules as production. Ask the client for a written list of who holds database manager access, the master password, and server shell or file access, and remove anyone who no longer needs it at the end of the review.
Find secrets in code and config files
Search the custom modules, Odoo configuration files, deployment scripts and version control history for API keys, passwords, OAuth client secrets and payment tokens. Check odoo.conf for the admin_passwd setting, and check module data files and ir.config_parameter records for stored credentials. Any secret found during the review is treated as exposed: report it, list where it is used, and plan rotation rather than deleting it from the repository alone.
Review developer and admin access
Inventory the accounts that can change code, deploy modules or reach the server, including developer mode access, Studio permissions and shared logins left by the former developer. Confirm that two-factor authentication and the identity provider configuration documented for Odoo are in place for administrators, and that sign-in through LDAP or single sign-on maps to the right groups. Where a shared account exists, ask the client to replace it before any code is handed over.
LDAP sign-in docsCheck overrides of access and record rules
Custom modules can add or replace security rules, group assignments and access control entries, sometimes to make a feature work for a user who should not have it. Compare each ir.model.access.csv file and each ir.rule record against the standard definitions for the installed version, and flag rules that were widened, removed or set to apply to all users. Record these findings as access risks, because a rule that is silently changed by a module can behave differently after an upgrade.
Protect the audit trail and findings
Keep the review notes, exported module lists and any copies of data in the client's controlled storage, not in personal folders or public tools. Record every person who touched the audit copy, every test login created, and every credential found, so the client can answer questions about exposure later. Agree in the written scope how findings containing sensitive detail are shared and who receives the final report.
Questions buyers ask before paying for a code audit
What drives the cost of auditing custom Odoo code?
The main drivers are the number of custom modules, how much business logic sits in Studio changes rather than versioned code, how much of the custom code overrides standard methods or views, how much automated test coverage exists, and how large and messy the database is. Each driver adds reading, reproduction and documentation work. Ask any provider to break the quote down by these areas so you can see which ones they have assumed and which you could reduce by preparing inventory and access in advance.
How long does an Odoo code audit usually take?
Duration depends on the same drivers as cost: module count, Studio usage, test coverage and data volume. A codebase with a short module list and clean version control moves much faster than one with dozens of undocumented changes made directly in the database. No fixed duration should be assumed before the inventory is complete. Ask for the phases, the deliverables each phase produces and the point at which the written scope is agreed, since most audits are fixed-scope.
What does the client need to provide for an audit?
Three things make the work fast and accurate. First, read access to the source code, including every custom module repository and any branches or tags that match the production version. Second, a copy of the database, ideally a duplicate with neutralization applied so that personal data is removed from the test copy. Odoo documents database duplication with neutralization for this purpose. Third, a named contact who can answer questions about business processes and who approved past changes. Confirm how the copy will be transferred and stored before work begins.
Can our in-house team run the audit instead?
Yes, if your team has Odoo developers who know the standard code well enough to recognize duplicated features and risky overrides. The audit needs the same skills a porting project needs: reading inheritance chains, checking views with XPath, comparing custom methods against the standard version you are moving to, and running the code on a test database. The main risk is that people who wrote or maintain the code often miss their own assumptions. An outside reviewer or a split review by two people can catch what a single internal team would overlook.
What can the audit estimate, and what can it not promise?
The audit can list each module and Studio change, classify it by how it behaves at upgrade time, identify standard features that now exist in the target version, flag overrides that depend on internals, record test coverage, and give an effort range for porting based on those findings. It cannot promise that the port will go without surprises, because behavior in the target version, data edge cases and third-party modules only show their full effect during the port and testing. Treat the estimate as a basis for scope, with a stated contingency method agreed up front.
How is the audit output used to scope a porting project?
The audit output becomes the input to a written, fixed-scope porting proposal. Each module or change is assigned to a disposition such as keep and port, replace with a standard feature, replace with an OCA or Apps Store module after a licensing and maintenance check, or retire. Items that need business decisions are listed separately. The porting scope, deliverables, test plan and timeline are then agreed in writing, so the audit reduces unknowns before any build work starts.
Does an audit check license compliance of custom modules?
The audit records the license key each module declares and whether it depends on Community, Enterprise or third-party code, because that affects who may use and distribute the result. It does not replace legal advice. If modules mix Community code with Enterprise code or Apps Store modules with different licenses, ask your counsel to review the declared licenses and distribution plans before the port is finalized.
How DeployOpen scopes and delivers an Odoo code audit
DeployOpen reviews inherited Odoo code against the version you run today and the version you plan to reach, in your own infrastructure. The work is fixed-scope, with the inventory, findings and porting estimate agreed in writing before the review starts. Each step produces evidence your own team can check after the engagement ends.
How we scope
- Agree in writing which custom modules, Studio changes and server actions fall inside the audit.
- Confirm the current Odoo version, the target version and the edition in use before review begins.
- Define how the porting estimate will be expressed so your team can compare it with partner quotes.
How we review
- Inventory every custom module, Studio customization and overridden standard method against the installed apps.
- Flag duplicated standard features and overrides that depend on internal methods likely to change at upgrade.
- Measure existing test coverage and run the test suite on a copy of the database with personal data neutralized.
How we hand over
- Deliver a written report with each finding, its location, the risk it carries and a suggested fix.
- Provide a module-by-module porting estimate that separates removable code from code that needs rewriting.
- Walk your developers and administrators through the findings so the knowledge stays with your team.
How we support
- Offer a retest after your team applies the fixes, covering the findings agreed in the scope.
- Make ongoing support, upgrades and continuous testing available as a retainer once the audit closes.
- Confirm with us which support windows apply to your version before setting the upgrade deadline.

