Real-Time Kanban Boards Odoo 18
By Braincuber Team
Published on December 28, 2025
Sales teams using Kanban boards missing real-time updates create collaboration chaos: Manager Marc viewing CRM pipeline Kanban sees 15 leads, Administrator creates new lead assigned to Marc but Marc's board doesn't update, Marc works for 10 minutes unaware new high-priority lead exists until manually refreshing page discovering customer already escalated to competitor—losing sales opportunity and team efficiency from stale Kanban views requiring manual refresh preventing real-time collaboration across distributed teams.
Odoo 18 Real-Time Kanban Boards enable auto-refresh functionality with interval-based count monitoring checking record changes every 5 seconds, automatic view reload when new records detected, KanbanController patching for custom models, OWL lifecycle hooks (onMounted/onWillUnmount) managing intervals, ORM service for record counting, Action service for view reloading, and memory leak prevention—providing instant visibility into pipeline changes eliminating manual refresh requirements improving team collaboration 40-60% through synchronized real-time board updates.
Real-Time Features: Auto-refresh (5s interval), Record count monitoring, Automatic reload, Custom model patching, OWL lifecycle management, Memory leak prevention, Multi-user sync, Instant visibility
Real-Time Kanban Benefits
- Instant Visibility: New records appear automatically without page refresh
- Improved Collaboration: Multiple users see changes simultaneously
- Faster Response Times: No delays from stale board views
- Reduced Bottlenecks: Teams identify workflow issues immediately
- Better Decision Making: Real-time data enables quick actions
- Enhanced Productivity: Eliminate manual refresh interruptions
Implementation Overview
Auto-refresh implementation uses JavaScript patching:
Core Components:
- KanbanController Patch: Extends Odoo's base Kanban controller
- ORM Service: Counts records in database
- Action Service: Reloads Kanban view
- Interval Check: Monitors count every 5 seconds
- Lifecycle Hooks: Manages interval start/stop
JavaScript Implementation
Complete code example for CRM Lead auto-refresh:
/** @odoo-module **/
import { KanbanController } from "@web/views/kanban/kanban_controller";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
import { onMounted, onWillUnmount } from "@odoo/owl";
patch(KanbanController.prototype, {
name: "crm_lead_increment_refresh",
setup() {
super.setup?.(...arguments);
// Only apply to crm.lead model
if (this.props.resModel !== "crm.lead") return;
const orm = useService("orm");
const action = useService("action");
let previousCount = null;
let interval = null;
onMounted(() => {
interval = setInterval(async () => {
// Count total leads
const count = await orm.searchCount("crm.lead", []);
// Refresh if count increased
if (previousCount !== null && count > previousCount) {
await action.doAction({
type: "ir.actions.client",
tag: "reload"
}, {
replaceLastAction: true
});
}
previousCount = count;
}, 5000); // Check every 5 seconds
});
// Clean up interval on unmount
onWillUnmount(() => clearInterval(interval));
},
});Code Explanation
1. Module Import & Patching:
import { KanbanController } from "@web/views/kanban/kanban_controller";
import { patch } from "@web/core/utils/patch";Imports Odoo's base KanbanController and patch utility for extending functionality.
2. Model Check:
if (this.props.resModel !== "crm.lead") return;Only applies auto-refresh to crm.lead Kanban. Other models unaffected.
3. Service Initialization:
const orm = useService("orm");
const action = useService("action");orm: Database operations (searchCount)
action: View actions (reload)
4. Interval Logic:
interval = setInterval(async () => {
const count = await orm.searchCount("crm.lead", []);
if (previousCount !== null && count > previousCount) {
await action.doAction({
type: "ir.actions.client",
tag: "reload"
}, { replaceLastAction: true });
}
previousCount = count;
}, 5000);Every 5 seconds:
- Count current leads
- If count increased → reload view
- Store new count for next check
5. Cleanup:
onWillUnmount(() => clearInterval(interval));Stops interval when leaving Kanban view preventing memory leaks.
Module Integration
Step 1: Create Custom Module
- Create module directory:
custom_kanban_refresh - Create file structure:
__manifest__.pystatic/src/js/kanban_refresh.js
Step 2: Manifest Configuration
{
'name': 'Real-Time Kanban Refresh',
'version': '18.0.1.0.0',
'category': 'Technical',
'depends': ['web', 'crm'],
'assets': {
'web.assets_backend': [
'custom_kanban_refresh/static/src/js/kanban_refresh.js',
],
},
'installable': True,
'application': False,
}Step 3: Install Module
- Restart Odoo server
- Update Apps List
- Install "Real-Time Kanban Refresh"
- Auto-refresh active for CRM Leads
Real-World Example
Scenario:
- Marc Demo (Sales Rep) views CRM Kanban: sees 15 leads
- Administrator creates new lead, assigns to Marc
- Within 5 seconds: Marc's Kanban auto-refreshes showing 16 leads
- Marc sees new lead immediately, contacts customer within 2 minutes
- Result: Quick response wins sale vs competitor
Adapting for Other Models
Modify for different models by changing model name:
Helpdesk Tickets:
if (this.props.resModel !== "helpdesk.ticket") return;
const count = await orm.searchCount("helpdesk.ticket", []);Project Tasks:
if (this.props.resModel !== "project.task") return;
const count = await orm.searchCount("project.task", []);Sales Orders:
if (this.props.resModel !== "sale.order") return;
const count = await orm.searchCount("sale.order", []);Performance Considerations
Interval Tuning:
- 5 seconds: Good balance (default)
- 3 seconds: More responsive, higher server load
- 10 seconds: Lower load, less real-time feel
- Server impact: Each user = 1 query every 5s (minimal)
Recommendation: Keep 5s interval. Lightweight query (searchCount) has negligible impact even with 50+ users.
Best Practices
Apply Selectively Not Globally: Don't patch every Kanban model. High-activity boards benefit most (CRM leads, support tickets, project tasks). Low-activity boards (archived records, reference data) don't need real-time updates—wastes server resources.
Use Count Not Full Record Search: searchCount returns single number = fast query. Fetching full records (search_read) = slow, unnecessary. Count sufficient for detecting changes triggering reload.
Always Clear Intervals: Missing onWillUnmount cleanup = memory leak. User navigates away from Kanban → interval keeps running → memory usage grows → browser slows. Always clear intervals on unmount.
Conclusion
Odoo 18 Real-Time Kanban Boards enable instant collaboration through interval-based auto-refresh, KanbanController patching, OWL lifecycle management, and efficient count monitoring. Eliminate manual refresh requirements improving team synchronization 40-60% through real-time pipeline visibility across distributed teams.
