Odoo is powerful, flexible, and extremely customizable—but this also means developers and functional consultants often encounter various errors during development or configuration.
In this blog, we’ll explore the most common Odoo errors, what causes them, and the step-by-step solutions to fix them quickly.
1. Access Rights and Record Rules Errors
These errors typically appear as:
- AccessError: You are not allowed to access this document
- User Error: Insufficient rights
- Record rules prevent access to the requested record
Why This Happens
- Missing ACL entries in ir.model.access.csv
- Record rules blocking read/write access
- Custom code creating records using sudo() incorrectly
- Users missing required groups
How to Fix
-
Check ACL (ir.model.access.csv)
Make sure you added:- create
- read
- write
-
delete
permissions properly for the model.
-
Check Record Rules
Go to:
Settings → Technical → Security → Record Rules
Test disabling suspicious rules temporarily to see if they are the cause. - Use sudo() properly
self.sudo().write({...})
-
Ensure proper group assignment
Add the correct group to the user
2. QWeb Template Rendering Errors
You might see:
- QWebException
- TemplateNotFound
- ValueError: Element <t> cannot be located in parent view
Why This Happens
- Misspelled template names
- Using undefined variables in reports
- Inheriting wrong XML xpath
- Missing closing tags or invalid XML structure
How to Fix
- Confirm template name
<t t-call="my_module.report_template"/>
- Check variables
Make sure your template receives the values passed from Python. - Fix XML inheritance
- Ensure xpath matches the target
- Use Odoo Debug Mode to inspect original templates
- Validate XML
Use an online XML validator before installing the module.
3. Python Traceback Errors in Odoo Code
Typical examples:
- AttributeError: 'bool' object has no attribute '…'
- KeyError
- TypeError
- ValueError: Expected singleton
Why This Happens
- Wrong use of recordsets
- Missing or wrong field values
- Incorrect domain filters
- Computed field dependencies not defined
How to Fix
a. Fix “Expected singleton”
Occurs when a method expects one record but receives many.
for rec in self:
rec.do_something()
b. Fix “AttributeError”
Make sure object/field exists before accessing:
if employee and employee.join_date:
...
c. Fix KeyError in write/create
Ensure dictionary keys match field names.
d. Fix TypeError
Check data types:
- Date vs string
- Integer vs float
- Many2one vs Many2many
4. Module Upgrade and Manifest Errors
You may see:
- ValueError: External ID not found
- Module not found
- Failed to install module
- ImportError
Why This Happens
- Wrong module directory name
- Incorrect dependency in __manifest__.py
- Moved XML files without updating manifest
- Duplicate external IDs
How to Fix
- Check manifest
'depends': ['base', 'sale', 'hr']
- Check data and demo file paths
Ensure XML files exist and contain valid content. - Search for duplicate id in XML
Two XML files with same external ID cause upgrade failure. - Clear cache and restart Odoo
sudo systemctl restart odoo
5. Database Errors
Typical errors:
- psycopg2.errors.UndefinedColumn
- Database not upgraded
- Column already exists
Why This Happens
- Changing field types without upgrading properly
- Removing fields from model but not from database
- Editing database manually
How to Fix
- Upgrade module
-u your_module
- Drop orphan columns (only when safe)
ALTER TABLE table_name DROP COLUMN column_name;
- Never modify database manually unless required
- Ensure field names are unique
6. Import Errors (CSV/Excel)
Common issues:
- ValueError: Wrong external ID
- Mapping error
- Invalid date format
Why This Happens
- Wrong column headers
- Missing required relational fields
- Wrong date format (Odoo uses YYYY-MM-DD)
- Wrong decimal separator
How to Fix
- Download a sample export file from Odoo
- Match columns exactly
- Use proper date format: 2025-12-01
- Use Many2one field name or external ID
7. JavaScript Errors (Web or POS)
Examples:
- TypeError: Cannot read property ‘…’ of undefined
- Owl component render crash
- POS UI blank screen
Why This Happens
- Wrong import path
- Missing @override decorators in Odoo 17+
- Wrong event bindings
How to Fix
- Check browser console for clues.
- Ensure modules are included in __manifest__.py.
- Restart Odoo and upgrade web modules.
- Follow proper Odoo OWL inheritance patterns.
8. Styling and PDF Report Issues
Typical symptoms:
- Fonts not applied in PDF (especially Google Fonts)
- CSS works on HTML but not PDF
- Images not loading
Why This Happens
- Odoo’s wkhtmltopdf has limited CSS support
- External fonts not allowed
- Images require absolute paths or base64
How to Fix
- Use standard fonts (Helvetica, DejaVu Sans).
- Embed small images as base64.
- Avoid advanced CSS like flexbox in PDF.
9. Slow Performance and Timeout Errors
Examples:
- Odoo Server timed out
- Longpolling issues
- Slow queries
Why This Happens
- Heavy compute fields without store=True
- Loops performing ORM writes repeatedly
- Missing SQL indexes
- Large reports generated in real-time (Excel/PDF)
How to Fix
- Use store=True on heavy compute fields.
- Use batch operations:
records.write({...})
instead of looping.
- Add SQL indexes for frequently searched fields.
- Use asynchronous cron for heavy tasks.
Conclusion
Odoo errors may look intimidating, but most are caused by predictable and fixable issues. By understanding how Odoo works—ORM, QWeb, security, caching, and module structure—you can diagnose and resolve common problems quickly.
