This module add the possibility to insert Bokeh charts into Odoo standard views.
Bokeh is a Python interactive visualization library that targets modern web browsers for presentation. Its goal is to provide elegant, concise construction of basic exploratory and advanced custom graphics in the style of D3.js, but also deliver this capability with high-performance interactivity over very large or streaming datasets. Bokeh can help anyone who would like to quickly and easily create interactive plots, dashboards, and data applications.
If you want to see some samples of bokeh's capabilities follow this link.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Adds two new field widgets that let developers display interactive Bokeh charts inside standard Odoo views. The chart is rendered from data stored in a field, so users see a live chart instead of plain text.
This is a technical building block rather than a business feature. It registers two new field types that can be used when building Odoo screens: bokeh_chart and bokeh_chart_json.
When a field uses one of these widgets, the value stored in the record is read as chart data and the Bokeh JavaScript libraries are loaded automatically in the backend. The widget then draws the chart inside the form or view where the field appears.
bokeh_chartexpects the field content to be text containing the chart definition, including the chart's HTML container and the script that draws it.bokeh_chart_jsonexpects the field content to be a structured value with the same pieces (container and script).
The chart is redrawn when the record is saved or refreshed, so it stays in sync with the stored data. No menus, reports, emails, scheduled actions or business rules are added, and no database models are defined. It only extends the web client's field system, so it is meant to be used by other modules or custom developments that need to show Bokeh visualisations to users.
Depends on
Required by other modules
Text generated by AI (DeepSeek) from reading the Odoo 19.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-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/web.
terminal Installation and usage
OCA documentation · Odoo 19.0Installation
Source · Odoo 19.0You need to install the python bokeh library:
pip3 install bokeh==3.1.1
Usage
Source · Odoo 19.0To insert a Bokeh chart in a view proceed as follows:
Using a Char field
- Declare a text computed field like this: bokeh_chart = fields.Text( string='Bokeh Chart', compute='_compute_bokeh_chart', )
- At the top of the module add the following imports: from bokeh.plotting import figure from bokeh.embed import components import json
- In its computed method do: def _compute_bokeh_chart(self): for rec in self: # Design your bokeh figure: p = figure() line = p.line([0, 2], [1, 8], line_width=5) # (...) # fill the record field with both markup and the script of a chart. script, div = components(p, wrap_script=False) rec.bokeh_chart = json.dumps({"div": div, "script": script})
- In the view, add something like this wherever you want to display your bokeh chart:
Using a Json field
- Declare a json computed field like this: bokeh_chart = fields.Json( string='Bokeh Chart', compute='_compute_bokeh_chart', )
- At the top of the module add the following imports: from bokeh.plotting import figure from bokeh.embed import components
- In its computed method do: def _compute_bokeh_chart(self): for rec in self: # Design your bokeh figure: p = figure() line = p.line([0, 2], [1, 8], line_width=5) # (...) # fill the record field with both markup and the script of a chart. script, div = components(p, wrap_script=False) rec.bokeh_chart = {"div": div, "script": script}
- In the view, add something like this wherever you want to display your bokeh chart: <field name="bokeh_chart" widget="bokeh_chart_json
No verified information in OCA: Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
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.