The Problem
You navigate to a kanban view and instead of seeing cards, you get a blank white area, an infinite loading spinner, or a red error popup. The list view for the same model works fine, but kanban refuses to render. This happens with both custom and standard Odoo kanban views.
Error Messages You Might See
# Browser console (F12 > Console tab):
OwlError: Cannot read properties of undefined (reading 'name')
Error: Missing field 'stage_id' in the kanban view
QWebError: Template 'kanban-box' not found
TypeError: Cannot read properties of null (reading 'getAttribute')
# Odoo server logs:
ValueError: Invalid view definition for kanban view
KeyError: 'color'
psycopg2.ProgrammingError: column "priority" does not existCommon Causes and Fixes
1. Missing Fields in Kanban Template
The kanban template references a field that is not declared in the <kanban> view definition. Unlike list and form views, kanban views only load fields that are explicitly included.
Fix: Ensure every field used in the template is declared:
<!-- BAD: field used in template but not declared -->
<kanban>
<templates>
<t t-name="kanban-box">
<div><field name="stage_id"/></div> <!-- ERROR: stage_id not loaded -->
</t>
</templates>
</kanban>
<!-- GOOD: field declared before templates -->
<kanban>
<field name="stage_id"/>
<field name="color"/>
<templates>
<t t-name="kanban-box">
<div><field name="stage_id"/></div>
</t>
</templates>
</kanban>2. Broken QWeb Template Syntax
A single XML syntax error in the kanban template will prevent the entire view from rendering.
Common mistakes:
- Unclosed tags:
<div>without</div> - Wrong attribute syntax:
t-if=record.activeinstead oft-if="record.active.raw_value" - Using
record.field_nameinstead ofrecord.field_name.valueorrecord.field_name.raw_value
Fix: Validate your XML and use the correct QWeb kanban syntax:
<!-- Correct kanban field access -->
<t t-if="record.active.raw_value">
<span t-esc="record.name.value"/>
<span t-esc="record.amount.value"/>
</t>3. JavaScript Error in Custom Kanban Widget
If you have custom JavaScript widgets or kanban extensions, a JS error will crash the entire view.
Debug:
- Open browser DevTools (F12)
- Go to Console tab
- Reproduce the error
- Look for the specific JS error and file reference
Fix: If using a custom widget, check that it is properly registered and all dependencies are loaded in the module's __manifest__.py assets.
4. default_group_by Without Stage Field
Setting default_group_by="stage_id" on a kanban view when the model does not have a stage_id field causes a silent failure.
<!-- BAD: model doesn't have stage_id -->
<kanban default_group_by="stage_id">
<!-- GOOD: use the correct field name -->
<kanban default_group_by="state">5. Missing Color/Priority Fields
Many kanban templates use color indices or priority stars. If the model lacks these fields, the view breaks.
Fix: Either add the fields to your model or remove the color/priority references from the template:
# Add to your model:
color = fields.Integer(string="Color Index")
priority = fields.Selection([
('0', 'Normal'),
('1', 'Important'),
], default='0', string="Priority")6. Inherited View Breaking Parent
A view inheritance that targets a non-existent xpath or inserts malformed XML will break the kanban view.
Debug:
# Check for view errors in Odoo:
# Settings > Technical > User Interface > Views
# Search for the model name
# Click each kanban view and check for syntax errors
# Or find broken views via SQL:
SELECT name, model, type FROM ir_ui_view
WHERE model = 'your.model' AND type = 'kanban';7. Browser Cache Issues
After updating a kanban view's XML, the browser may cache the old template.
Fix:
- Hard refresh: Ctrl+Shift+R (or Cmd+Shift+R on Mac)
- Clear browser cache
- Add
?debug=assetsto the URL to force asset regeneration - In dev mode: Settings > Technical > Regenerate Assets Bundle
8. Performance: Too Many Records
Kanban views loading thousands of records can timeout or freeze the browser.
Fix: Add a default filter or limit:
<kanban limit="40">
...
</kanban>Diagnostic Steps
- Open browser console (F12) and check for JavaScript errors
- Try the same model's list view — if it works, the issue is kanban-specific
- Check Odoo logs for Python errors during the view load
- Use
?debug=1mode to get detailed error messages - Temporarily remove custom view inheritances to isolate the problem
- Validate XML syntax of your kanban template