Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][17.0] kpi #936

Open
wants to merge 29 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
60c257d
mgmtsystem_kpi rename to kpi (#543)
naousse Dec 2, 2016
cfb375f
Increase version
ivantodorovich Dec 13, 2017
2d0f7b4
Highlight invalid ranges
ivantodorovich Dec 13, 2017
740ed81
Added myself to contributors in README
ivantodorovich Dec 13, 2017
6fb8042
Module upgrade is enough
ivantodorovich Dec 13, 2017
bf31014
Add tests
ivantodorovich Dec 18, 2017
c013fbc
[MIG] kpi to v11
AdriaGForgeFlow Nov 12, 2018
b0c0de8
[IMP] kpi: Add Kanban Views. Improve python code, Allow to access Odoo
etobella Nov 27, 2018
6acebda
[kpi] allow to return kpi and color in a single call without thresholds.
JordiBForgeFlow Dec 28, 2018
8a23d1c
add periodicity in minutes
JordiBForgeFlow Dec 28, 2018
a700f7c
create kpi history as sudo
JordiBForgeFlow Jan 1, 2019
d3b6958
[12.0][MIG] Migrate module kpi to v12
AdriaGForgeFlow Jan 2, 2019
a129c0a
[ADD] icon.png
OCA-git-bot Sep 2, 2019
33930f6
Translated using Weblate (Portuguese (Brazil))
Sep 2, 2019
3a2aa93
Update translation files
oca-transbot Sep 23, 2019
364d95a
Translated using Weblate (Portuguese (Brazil))
Nov 24, 2019
6cb846e
[IMP] kpi: black, isort
Jun 4, 2020
5586167
Migration to 13.0
Jun 4, 2020
6633470
[UPD] Update kpi.pot
oca-travis May 15, 2021
1ee29a4
[UPD] README.rst
OCA-git-bot May 15, 2021
df52d59
Apply dotfiles
sbidoul Jul 27, 2021
e3e826e
kpi 13.0.1.0.1
OCA-git-bot Jul 27, 2021
95a3e80
Translated using Weblate (Italian)
mymage Mar 30, 2023
5594988
Translated using Weblate (Italian)
mymage Apr 10, 2023
ac99a76
Translated using Weblate (Italian)
mymage Apr 17, 2023
2eb7a60
[UPD] README.rst
OCA-git-bot Sep 3, 2023
28b946e
Update translation files
weblate Oct 9, 2023
373e5bb
Translated using Weblate (Italian)
mymage Mar 28, 2024
bfbbb76
[IMP] kpi: pre-commit auto fixes
EdgarRetes Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions kpi/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
=========================
Key Performance Indicator
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:cfa60f307c1347dd86421388daf4ddf0cef49cfe864c034368a4b031d2dc045c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/17.0/kpi
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-kpi
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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)

**Table of contents**

.. contents::
:local:

Usage
=====

Example of usage: https://www.youtube.com/watch?v=OC4-y2klzIk

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20kpi%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Savoir-faire Linux

Contributors
------------

- Daniel Reis <[email protected]>
- Glen Dromgoole <[email protected]>
- Loic Lacroix <[email protected]>
- Sandy Carter <[email protected]>
- Gervais Naoussi <[email protected]>
- Iván Todorovich <[email protected]>
- Adrià Gil <[email protected]>
- `Guadaltech <https://www.guadaltech.es>`__:

- Fernando La Chica <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/kpi>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions kpi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
30 changes: 30 additions & 0 deletions kpi/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2012 - Now Savoir-faire Linux <https://www.savoirfairelinux.com/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Key Performance Indicator",
"version": "13.0.1.0.1",
"author": "Savoir-faire Linux,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"license": "AGPL-3",
"category": "Report",
"depends": ["base_external_dbsource"],
"data": [
"security/kpi_security.xml",
"security/ir.model.access.csv",
"views/kpi_category_views.xml",
"views/kpi_history_views.xml",
"views/kpi_threshold_range_views.xml",
"views/kpi_threshold_views.xml",
"views/kpi_views.xml",
"views/menu.xml",
"data/kpi_data.xml",
],
"images": [
"images/kpi_definition.png",
"images/kpi_computation.png",
"images/kpi_threshold.png",
"images/kpi_range.png",
],
"installable": True,
}
16 changes: 16 additions & 0 deletions kpi/data/kpi_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2012 - Now Savoir-faire Linux <https://www.savoirfairelinux.com/>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record forcecreate="True" id="ir_cron_kpi_action" model="ir.cron">
<field name="name">Update KPI values</field>
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_kpi" />
<field name="state">code</field>
<field name="code">model.update_kpi_value()</field>
</record>
</odoo>
Loading
Loading