Author: |
Savoir-faire Linux, Odoo Community Association (OCA) |
License: |
AGPL-3 |
Branch: |
11.0 |
Repository: |
savoirfairelinux/web |
Dependencies: |
web |
Languages: |
CSS (421, 5.8%),
HTML (383, 5.2%),
JavaScript (6376, 87.4%),
Python (16, 0.2%),
XML (13, 0.2%),
and
reStructuredText (89, 1.2%) |
Other branches: |
11.0_web_widget_table,
and
11_web_widget_table |
<h1 class="title">Web Datatable Widget</h1>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/11.0/web_widget_table"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-11-0/web-11-0-web_widget_table"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>A module to add datatable <a class="reference external" href="https://datatables.net/">https://datatables.net/</a> as a widget</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#other-credits" id="id6">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id1">Usage</a></h2>
<p>Use this widget by saying:</p>
<pre>
<code lang="xml"><field name="my_table" widget="widget_table" options="{
'field_name': 'child_ids',
'datatable_params':{'searching': False,
'paging': False,
'info': False},
'fields': ['name','date_start', 'date_end', 'real_date_start', 'real_date_end', 'total_time'],
'headers': ['Name','Date Start', 'Date End', 'Real Date Start', 'Real Date End', 'Total Time']}"/></code>
</pre>
<p>"my_table" field must be of type char, it is only used to display the table. For example:</p>
<pre>
<code lang="python">my_table = fields.Char(
store=False)</code>
</pre>
<p>You need to pass the following parameters:</p>
<dl class="docutils">
<dt>field_name</dt>
<dd>This required parameter indicates a One2many field present in the model from which
the fields parameter will refer</dd>
<dt>fields</dt>
<dd>This required parameter is a list that indicates the fields from child_ids records
that will be displayed in the datatable</dd>
<dt>headers</dt>
<dd>The required parameter is a list of used string to display in the table header,
they should be in the same order as the fields</dd>
<dt>datatable_params</dt>
<dd><dl class="first last docutils">
<dt>This is to pass the datatable parameters <a class="reference external" href="https://datatables.net/manual/options">https://datatables.net/manual/options</a>, like:</dt>
<dd>paging;
info;
searching;
scrollY;
etc.</dd>
</dl>
</dd>
</dl>
<a name="bug-tracker"></a>
<h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_table%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
<a name="credits"></a>
<h2><a class="toc-backref" href="#id3">Credits</a></h2>
<a name="authors"></a>
<h3><a class="toc-backref" href="#id4">Authors</a></h3>
<ul class="simple">
<li>Savoir-faire Linux</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id5">Contributors</a></h3>
<ul class="simple">
<li>Luis Garcia (<a class="reference external" href="mailto:luis.garcia@savoirfairelinux.com">luis.garcia@savoirfairelinux.com</a>)</li>
<li>Rim Ben Dhaou (<a class="reference external" href="mailto:rim.bendhaou@savoirfairelinux.com">rim.bendhaou@savoirfairelinux.com</a>)</li>
<li>Larbi Gharib (<a class="reference external" href="mailto:larbi.gharib@savoirfairelinux.com">larbi.gharib@savoirfairelinux.com</a>)</li>
<li>William Beverly (<a class="reference external" href="mailto:william.beverly@savoirfairelinux.com">william.beverly@savoirfairelinux.com</a>)</li>
<li>Jananjoy Rajkumar (<a class="reference external" href="mailto:jananjoy.rajkumar@savoirfairelinux.com">jananjoy.rajkumar@savoirfairelinux.com</a>)</li>
<li>Pierre Gault (<a class="reference external" href="mailto:pierre.gault@savoirfairelinux.com">pierre.gault@savoirfairelinux.com</a>)</li>
</ul>
<a name="other-credits"></a>
<h3><a class="toc-backref" href="#id6">Other credits</a></h3>
<p>The development of this module has been financially supported by:
* Savoir-faire Linux</p>
<a name="maintainers"></a>
<h3><a class="toc-backref" href="#id7">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</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/eilst"><img alt="eilst" src="https://github.com/eilst.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/11.0/web_widget_table">OCA/web</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>