KPI Cards
A band of KPI cards above backend views
A technical module: a band of KPI cards that other modules put above their backend views, and the binding that makes a click on a card activate the matching search filter.
- One look for every dashboard— a card shows a number (or amounts, one line per currency), a label, an icon and an accent colour; a card at zero stays coloured, dimmed; the active card is outlined. The colours are Odoo's own theme variables, so the cards follow the light and the dark mode of the backend.
- A figure followed over time— a card can also show its change against the previous period (green up, red down), a progress bar towards a target and a trend line; each is drawn only when the card gives it.
- A click is a filter—
useKpiCardFiltersactivates the card's filter, drops the filters of the other cards so that two cards never add up, and clears the filter on a second click. The user's own filters are kept. - Nothing to configure— the module adds no model, menu or data. It does nothing on its own: it is installed as a dependency of the modules that show cards.
For developers. Add deltatech_web_kpi_cards to depends, then show the cards from any OWL
component, for instance a list renderer:
import {KpiCards, useKpiCardFilters} from "@deltatech_web_kpi_cards/kpi_cards/kpi_cards.esm";
const FILTERS = ["filter_late", "filter_today"];
class MyDashboard extends Component {
static template = xml`<KpiCards cards="cards" onCardClick.bind="onCardClick"/>`;
static components = {KpiCards};
setup() {
this.filters = useKpiCardFilters(FILTERS);
}
get cards() {
return [
{key: "filter_late", label: "Late", count: 4, icon: "schedule", tone: "warning",
active: this.filters.isActive("filter_late")},
];
}
onCardClick(card) {
this.filters.toggle(card.key);
}
}
A card: key (also its data-card attribute), label, then count or amounts (formatted
strings: formatKpiAmount(amount, currencyId) shows 1.9M lei from 100,000 on), optional
subtitle, title (the tooltip, the label by default: put the exact amount there), icon (an oi
icon name, as listed in web/icons.py: Font Awesome is gone in Odoo 20) and tone: info, success,
warning, danger, purple, action or slate (the default).
Keep the card filters in a group of their own in the search view, a <separator/> before and
after them: a click clears the group of the active card filter, and nothing else.
What a card counts belongs to the module that shows it: give the card and its filter the same server-side domain, and the number on the card is the number of rows the click opens.
20.0.1.2.1 (2026-11-14)
- Apps Store banner: the "Odoo Online" badge shows that the module has no Python code and installs on Odoo Online.
20.0.1.2.0 (2026-09-30)
- A card can also show a figure followed over time, each part drawn only when given:
delta(the change in percent against the previous period, green when up and red when down, with itsdeltaLabel),progress(percent of a target, as a bar, with itsprogressLabel) andtrend(the last values, as a line). The cards that do not give them look exactly as before.formatKpiDeltaandkpiSparklinePointsare exported for the modules that build the cards.
20.0.1.1.0 (2026-09-29)
- The cards share the whole width of the page, with no empty space at the end of the row.
- Large numbers fit on a card: from 100,000 on, amounts and counts are shown in thousands or
millions (1.9M lei, 123.5k), with Odoo's own compact format;
formatKpiAmountandformatKpiCountdo it for the modules that build the cards, and a card'stitle(its tooltip) can carry the exact value.
20.0.1.0.0 (2026-09-28)
- First release: the KPI cards and their search filter binding, taken out of
deltatech_delivery_dashboardso that other dashboards share the same look and behaviour.
Need help getting started?
Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.
Questions about this module? Write to us — the developers who build it will answer.
More apps by Terrabit
Other modules from the same publisher, built to work together. All apps →
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 284 |
| Technical Name |
deltatech_web_kpi_cards |
| License | LGPL-3 |
| Website | https://www.terrabit.ro |
Please log in to comment on this module