Troubleshooting & FAQ
Common Upgrade Issues
1. Module Won't Install
Symptom: Unable to install module 'module_name'
Solutions:
# Check dependencies first
./odoo-bin shell -d test_db
>>> mod = env['ir.module.module'].search([('name', '=', 'module_name')])
>>> print(mod.dependencies_id.mapped('depend_id.state'))
# Clear cache and retry
./odoo-bin -u module_name -d test_db --stop-after-init
2. Import Errors
Symptom: ImportError: cannot import name 'api' from 'odoo'
Common Fixes:
# v13 → v18 import changes
# Old
from odoo import models, fields, api, _
# New (same, but check for moved modules)
from odoo import models, fields, api, _
3. View Inheritance Errors
Symptom: Error while validating view
Debug Steps: 1. Check parent view exists 2. Verify field names haven't changed 3. Ensure proper XML namespacing 4. Validate against v18 view architecture
4. JavaScript Errors
Symptom: Cannot read property of undefined
Common Causes: - Changed widget names - Modified JS module paths - Deprecated methods
Fix:
// Check for v18 widget API changes
odoo.define('module_name.widget', function (require) {
'use strict';
// v18 uses different requires
const Widget = require('web.Widget');
// vs
const { Widget } = require('@web/core/widget');
});
5. Performance Degradation
Symptom: Slow page loads or timeouts
Investigation:
# Enable profiling
./odoo-bin --log-sql --log-level=debug
# Check for missing indexes
SELECT schemaname, tablename, indexname, indexdef
FROM pg_indexes
WHERE tablename = 'model_table';
Frequently Asked Questions
Q: Why are some modules marked as "currently not used"?
A: These modules were installed historically but analysis shows no active usage. They're candidates for removal unless business requirements change.
Q: How do I handle third-party module upgrades?
A: 1. Check vendor's v18 compatibility 2. Review their changelog 3. Test in isolation first 4. Contact vendor support if needed
Q: What's the difference between v17 and v18?
A: While we have v17 code for reference, we're jumping directly to v18. Key differences: - Python 3.10+ recommended for v18 - New frontend framework updates - Enhanced performance features - Updated security model
Q: How do I test POS modules?
A: POS modules require special testing:
# 1. Install POS dependencies
./odoo-bin -i point_of_sale,pos_utils -d test_db
# 2. Configure POS session
# 3. Test transactions
# 4. Verify offline mode
Q: What about data migration?
A: Data migration is handled by: 1. Odoo's built-in migration for standard models 2. Custom migration scripts for custom fields 3. Pre/post-upgrade hooks in modules
Q: How to handle removed features?
A: When Odoo removes features: 1. Find v18 alternative 2. Implement compatibility layer 3. Plan gradual migration 4. Update user training
Error Reference
Database Errors
column does not exist
- Run database upgrade
- Check migration scripts
- Verify field definitions
constraint violation
- Check data integrity
- Review constraints
- Clean duplicate data
Security Errors
Access Denied
- Update access rights CSV
- Check record rules
- Verify group assignments
Asset Errors
404 on static files
- Update manifest assets
- Check file paths
- Clear browser cache
Debug Commands
Useful Shell Commands
# Check installed modules
env['ir.module.module'].search([('state', '=', 'installed')]).mapped('name')
# Find model changes
env['ir.model'].search([('model', 'like', 'cnf%')])
# List all customizations
env['ir.model.fields'].search([('state', '=', 'manual')])
Database Queries
-- Find missing dependencies
SELECT name FROM ir_module_module
WHERE state = 'to install'
AND name IN (SELECT name FROM ir_module_module_dependency);
-- Check for orphaned data
SELECT table_name FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name LIKE '%_old';
Getting Support
Internal Resources
- Check this documentation first
- Review similar completed upgrades
- Consult team lead for complex issues
External Resources
- Odoo Official Docs
- Odoo Community Forum
- Third-party vendor support
- Odoo Enterprise support (if applicable)
Upgrade Checklist
Before marking a module as complete: - [ ] All tests pass - [ ] No console errors - [ ] UI functions correctly - [ ] Data integrity maintained - [ ] Performance acceptable - [ ] Documentation updated - [ ] Code reviewed - [ ] Staging tested
Known Issues
Theme Modules
- Clarico Vega theme marked as unused
- May need replacement with v18 themes
- Check website functionality carefully
Connector Modules
- Heavy customization in connector framework
- Test all integration points
- Verify API compatibility
POS Offline Mode
- Significant changes in v18
- Requires thorough testing
- May need architecture updates