Key Performance Indicators
kpi · OCA/reporting-engine
OCA/server-tools 9.0 → OCA/reporting-engine 12.0–19.0
-
Security25/25No findings
-
Activity25/25Last human commit 2 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 6 Odoo series since 9.0
Heuristic over the facts below, not an audit · How it's computed
Description
This module provides the basis for creating key performance indicators, including static and dynamic thresholds (SQL query or Python code), on local and remote data sources.
The module also provides the mecanism to update KPIs automatically. A scheduler is executed every hour and updates the KPI values, based on the periodicity of each KPI. KPI computation can also be done manually.
A threshold is a list of ranges and a range is:
- a name (like Good, Warning, Bad)
- a minimum value (fixed, sql query or python code)
- a maximum value (fixed, sql query or python code)
- color (RGB code like #00FF00 for green, #FFA500 for orange, #FF0000 for red)
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 12
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_kpi_category_form |
kpi.category.form | kpi.category | form | New |
view_kpi_category_tree |
kpi.category.tree | kpi.category | list | New |
view_kpi_filter |
kpi.filter | kpi | search | New |
view_kpi_form |
kpi.form | kpi | form | New |
view_kpi_history_form |
kpi.history.form | kpi.history | form | New |
view_kpi_history_tree |
kpi.history.tree | kpi.history | list | New |
view_kpi_kanban |
kpi.kanban | kpi | kanban | New |
view_kpi_threshold_form |
kpi.threshold.form | kpi.threshold | form | New |
view_kpi_threshold_range_form |
kpi.threshold.range.form | kpi.threshold.range | form | New |
view_kpi_threshold_range_tree |
kpi.threshold.range.tree | kpi.threshold.range | list | New |
view_kpi_threshold_tree |
kpi.threshold.tree | kpi.threshold | list | New |
view_kpi_tree |
kpi.tree | kpi | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
-
activeBooleandefault=Truehelp='Only active KPIs will be updated by the scheduler based on the periodicity configuration.' -
category_idMany2one → kpi.categoryrequired=True args: 'kpi.category' -
colorTextcompute='_compute_display_last_kpi_value' -
company_idMany2one → res.companydefault=<expr> args: 'res.company' -
dbsource_idMany2one → base.external.dbsourceargs: 'base.external.dbsource', 'External DB Source' -
descriptionText -
history_idsOne2many → kpi.historyargs: 'kpi.history', 'kpi_id' -
kpi_codeTexthelp="SQL code must return the result as 'value' (i.e. 'SELECT 5 AS value')." args: 'KPI Code' -
kpi_typeSelectionargs: [('python', 'Python'), ('local', 'SQL - Local DB'), ('external', 'SQL - External DB')], 'KPI Computation Type' -
last_executionDatetimecompute='_compute_display_last_kpi_value' args: 'Last execution' -
nameCharrequired=True -
next_execution_dateDatetimeargs: 'Next execution date' -
periodicityIntegerdefault=1 -
periodicity_uomSelectiondefault='day'required=True args: [('minute', 'Minute'), ('hour', 'Hour'), ('day', 'Day'), ('week', 'Week'), ('month', 'Month')], 'Periodicity UoM' -
threshold_idMany2one → kpi.thresholdrequired=True args: 'kpi.threshold' -
valueFloatcompute='_compute_display_last_kpi_value'
-
compute_kpi_value(self) -
update_kpi_value(self)@api.model -
update_next_execution_date(self)
-
descriptionText -
nameCharrequired=True
No public methods.
-
colorTextdefault='#FFFFFF'readonly=Truerequired=True -
company_idMany2one → res.companydefault=<expr> args: 'res.company' -
dateDatetimedefault=<expr>readonly=Truerequired=True args: 'Execution Date' -
kpi_idMany2one → kpirequired=True args: 'kpi', 'KPI' -
nameChardefault=fields.Datetime.now()required=Truesize=150 -
valueFloatreadonly=Truerequired=True
No public methods.
-
company_idMany2one → res.companydefault=<expr> args: 'res.company' -
invalid_messageCharcompute='_compute_is_valid_threshold'size=100string='Message' -
kpi_idsOne2many → kpiargs: 'kpi', 'threshold_id', 'KPIs' -
nameCharrequired=True -
range_idsMany2many → kpi.threshold.rangeargs: 'kpi.threshold.range', 'kpi_threshold_range_rel', 'threshold_id', 'range_id', 'Ranges' -
validBooleancompute='_compute_is_valid_threshold'default=Truerequired=True
-
create(self, vals_list)@api.model_create_multi -
get_color(self, kpi_value)
-
colorCharhelp='Choose your color' -
company_idMany2one → res.companydefault=<expr> args: 'res.company' -
invalid_messageCharcompute='_compute_is_valid_range'size=100string='Message' -
max_codeTextargs: 'Maximum Computation Code' -
max_dbsource_idMany2one → base.external.dbsourceargs: 'base.external.dbsource', 'External DB Source Maximum' -
max_errorCharcompute='_compute_max_value' args: 'Maximum Error' -
max_fixed_valueFloatargs: 'Maximum Fixed Value' -
max_typeSelectionrequired=Trueselection='_selection_value_type' -
max_valueFloatcompute='_compute_max_value'string='Maximum Value' -
min_codeTextargs: 'Minimum Computation Code' -
min_dbsource_idMany2one → base.external.dbsourceargs: 'base.external.dbsource', 'External DB Source Minimum' -
min_errorCharcompute='_compute_min_value' args: 'Minimum Error' -
min_fixed_valueFloatargs: 'Minimum Fixed Value' -
min_typeSelectionrequired=Trueselection='_selection_value_type' -
min_valueFloatcompute='_compute_min_value'string='Minimum Value' -
nameCharrequired=True -
threshold_idsMany2many → kpi.thresholdargs: 'kpi.threshold', 'kpi_threshold_range_rel', 'range_id', 'threshold_id', 'Thresholds' -
validBooleancompute='_compute_is_valid_range'default=Truerequired=True
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…