Skip to content

Odoo anti-patterns · Technical reference

Odoo anti-patterns & common mistakes

The mistakes that pass code review and surface as performance incidents in production.

27 entries · free, no sign-up

Showing all 27 entries

  1. 001

    Writing Inside a Loop

    Calling write() on individual records inside a loop generates N SQL queries. Updating 10,000 records takes 30 seconds instead of less than 1 second.

  2. 002

    search() + filtered() Abuse

    Fetching ALL records into memory then filtering in Python instead of the DB. High memory usage and slow response time on large tables.

  3. 003

    Overriding create() Without super()

    Forgetting to call super() breaks the inheritance chain and other installed modules. Features from other modules silently stop working, leading to data corruption.

  4. 004

    Using self[0] Without ensure_one()

    Assuming a recordset contains only one record without explicitly checking. Silent errors where logic is applied to the first record of a set, ignoring others.

  5. 005

    Hardcoding XML IDs

    Referencing records by their external ID string instead of using references. Code breaks if the external ID changes or the module is renamed.

  6. 006

    Incorrect depends() on Compute Fields

    Forgetting a dependency or including a field that doesn't trigger recalculation. The compute field doesn't update when the data changes, showing stale info.

  7. 007

    SQL Injection via f-strings

    Building raw SQL queries with string formatting instead of parameters. Total database compromise via SQL Injection. Sensitive data theft.

  8. 008

    Abusing sudo()

    Using sudo() to bypass errors instead of fixing underlying access rights. Data leaks: Normal users seeing or modifying data they shouldn't access.

  9. 009

    Unprotected Controller Routes

    Defining web routes with auth='none' or auth='public' without internal checks. Anonymous users can trigger internal Python methods or view private data.

  10. 010

    Storing Sensitive Data in Plaintext

    Saving passwords or API keys in regular Char fields instead of encrypted fields. If the DB is compromised, all third-party integration keys are exposed.

  11. 011

    Modifying Core Templates with replace

    Using xpath position='replace' on standard views. Breaks other modules that try to xpath into the same elements.

  12. 012

    Heavy Logic in t-esc / t-out

    Performing complex Python calls inside QWeb XML templates. Slow page rendering because logic runs for every line in a report/view.

  13. 013

    Using jQuery in OWL Components

    Directly manipulating the DOM with jQuery instead of OWL's reactive state. UI becomes out of sync with the component state, causing random bugs.

  14. 014

    Missing Responsive Classes

    Designing views that only look good on 1920x1080 screens. The mobile app and tablet views become unusable for on-site staff.

  15. 015

    Forgetting the 'String' on Fields

    Relying on Odoo to auto-format technical field names as labels. The UI shows 'X_partner_id' instead of 'Customer Name', looking unprofessional.

  16. 016

    N+1 Query in Compute Fields

    Accessing relational fields in a loop without prefetching. Extremely slow form loads and list views (100+ queries per page).

  17. 017

    Abusing api.onchange for Logic

    Placing heavy business logic in UI-only onchange methods. The UI 'freezes' while typing because the server is processing complex data.

  18. 018

    Missing Database Indexes

    Frequently searched fields without index=True. Full table scans: Odoo gets slower as the DB grows.

  19. 019

    Large Binary Fields in the DB

    Storing 10MB+ PDFs/Images directly in the SQL table. Slow DB backups and high memory usage. Use the filestore instead.

  20. 020

    Unoptimized Cron Intervals

    Running heavy data processing every 1 minute. Database lock contention and slow performance for all users.

  21. 021

    21. workers = 0

    Running single-threaded in production. One slow user blocks every other user from using Odoo.

  22. 022

    22. No Filestore Backup

    Restoring DB without /var/lib/odoo/filestore/. All images, PDFs, and attachments are lost forever.

  23. 023

    23. Exposed Port 8069

    Exposing Odoo directly to the internet without Nginx. No SSL, no rate limits, no buffer.

  24. 024

    24. Go-Live on Friday

    Launching a new ERP system before the weekend when support staff is unavailable.

  25. 025

    25. Skipping UAT

    Assuming the 'Consultant' tested everything without involving the actual business users.

  26. 026

    26. The 'Big Bang' Migration

    Trying to move 10 years of messy history into Odoo in one day without a pilot run.

  27. 027

    27. Training via Manuals

    Giving users a 200-page PDF and expecting them to learn Odoo. They won't read it.

Next

Hiring for this, or being interviewed for it?

We run technical assessment for Odoo hires, and we take on the work these questions describe.