OdooWiki OCA HUB

Kpi Dashboard Bokeh

kpi_dashboard_bokeh folder_open OCA/reporting-engine open_in_new
Uncategorised License: AGPL-3

Define KPI dashboard graphs using bokeh.

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Adds a new 'Bokeh' widget type to KPI dashboard items, letting users build interactive Bokeh charts inside Odoo dashboards using Python code.

This module extends the KPI dashboard feature so that a KPI can be displayed as a Bokeh chart instead of a plain number or other widget type.

  • On a kpi.kpi record, the Widget field gains a new option called Bokeh. When that option is selected, the KPI is rendered as a Bokeh chart on the dashboard.
  • The KPI's code can use Bokeh's figure and components helpers to build a chart and return it; a simple_components helper is also provided that applies a transparent theme so the chart blends into the dashboard background.
  • The chart is shown inside the dashboard widget area, sized to fit the widget's height, and the dashboard item keeps its usual position, size and colour settings.
  • A demo dashboard item named Bokeh is included to show a simple line chart.

The module depends on web_widget_bokeh_chart and kpi_dashboard, and it touches the kpi.kpi model and the backend assets. It does not add its own menus; the Bokeh option appears wherever KPI widgets are configured.

Models and fields (1)
  • kpi.kpi · extends an existing modelwidget

Text generated by AI (DeepSeek) from reading the Odoo 14.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/reporting-engine.

terminal Installation and usage

OCA documentation · Odoo 14.0
  • Access Dashboards > Configuration > KPI Dashboards > Configure KPI
  • Create a new KPI specifying with widget type bokeh

In order to define the value, you can must define a function like:

from bokeh.plotting import figure
from bokeh.embed import components

def test_demo_bokeh(self):
    p = figure(width=1000, height=1000, sizing_mode="scale_both")
    # import that as `from bokeh.plotting import figure`
    p.line([0, 1, 2], [1, 10, random.random() * 10], line_width=5)
    # (...)
    # fill the record field with both markup and the script of a chart.
    script, div = components(p)
    return {"bokeh": "%s%s" % (div, script)}

You can also use code. The following items will be added automatically to the code items:

  • figure
  • components
  • simple_components: Like components but adds a theme with no alpha background

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.