Browse Source

[UPD] README.rst

12.0
OCA-git-bot 4 years ago
parent
commit
cebfe2a553
  1. 20
      kpi_dashboard/README.rst
  2. 19
      kpi_dashboard/static/description/index.html

20
kpi_dashboard/README.rst

@ -51,12 +51,14 @@ Configure KPIs
Using KPI with code Using KPI with code
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Define the code directly on the code field. You can use:
* `self` and `model` as the kpi element
* The script should create a variable called `result` as a dictionary that
will be stored as the value
Define the code directly on the code field. You can use `self` and `model` as the kpi element
The script should create a variable called `result` as a dictionary that
will be stored as the value.
For example, we can use::
result = {}
result['value'] = len(model.search([('id', '=', %s)]))
result['previous'] = len(model.search([('id', '!=', %s)]))
Configure dashboards Configure dashboards
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
@ -103,6 +105,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
.. |maintainer-etobella| image:: https://github.com/etobella.png?size=40px
:target: https://github.com/etobella
:alt: etobella
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-etobella|
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/kpi_dashboard>`_ project on GitHub. This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/kpi_dashboard>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

19
kpi_dashboard/static/description/index.html

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Kpi Dashboard</title> <title>Kpi Dashboard</title>
<style type="text/css"> <style type="text/css">
@ -405,12 +405,15 @@ use the code to directly compute it.</li>
</div> </div>
<div class="section" id="using-kpi-with-code"> <div class="section" id="using-kpi-with-code">
<h2><a class="toc-backref" href="#id3">Using KPI with code</a></h2> <h2><a class="toc-backref" href="#id3">Using KPI with code</a></h2>
<p>Define the code directly on the code field. You can use:</p>
<ul class="simple">
<li><cite>self</cite> and <cite>model</cite> as the kpi element</li>
<li>The script should create a variable called <cite>result</cite> as a dictionary that
will be stored as the value</li>
</ul>
<p>Define the code directly on the code field. You can use <cite>self</cite> and <cite>model</cite> as the kpi element
The script should create a variable called <cite>result</cite> as a dictionary that
will be stored as the value.
For example, we can use:</p>
<pre class="literal-block">
result = {}
result['value'] = len(model.search([('id', '=', %s)]))
result['previous'] = len(model.search([('id', '!=', %s)]))
</pre>
</div> </div>
<div class="section" id="configure-dashboards"> <div class="section" id="configure-dashboards">
<h2><a class="toc-backref" href="#id4">Configure dashboards</a></h2> <h2><a class="toc-backref" href="#id4">Configure dashboards</a></h2>
@ -452,6 +455,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/etobella"><img alt="etobella" src="https://github.com/etobella.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/kpi_dashboard">OCA/reporting-engine</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/kpi_dashboard">OCA/reporting-engine</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>

Loading…
Cancel
Save