[UPD] README.rst

pull/447/head
OCA-git-bot 2020-04-30 10:28:14 +00:00 committed by Enric Tobella
parent bae4389d5a
commit d2af9d917b
2 changed files with 27 additions and 12 deletions

View File

@ -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: 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
* `self` and `model` as the kpi element will be stored as the value.
* The script should create a variable called `result` as a dictionary that For example, we can use::
will be stored as the value
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.

View File

@ -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> <p>Define the code directly on the code field. You can use <cite>self</cite> and <cite>model</cite> as the kpi element
<ul class="simple"> The script should create a variable called <cite>result</cite> as a dictionary that
<li><cite>self</cite> and <cite>model</cite> as the kpi element</li> will be stored as the value.
<li>The script should create a variable called <cite>result</cite> as a dictionary that For example, we can use:</p>
will be stored as the value</li> <pre class="literal-block">
</ul> 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>