Search 1.9 billion lines of Odoo code on GitHub

web_widget_table

Author: Savoir-faire Linux, Odoo Community Association (OCA)
License: ALGPL-3.0
Branch: 11_web_widget_table
Repository: savoirfairelinux/web
Dependencies: web
Languages: CSS (421, 6.1%), JavaScript (6376, 92.6%), Python (14, 0.2%), XML (13, 0.2%), and reStructuredText (58, 0.8%)
Other branches: 11.0, and 11.0_web_widget_table

<a class="reference external image-reference" href="https://www.gnu.org/licenses/agpl"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a name="web-widget-table"></a> <h2>Web Widget Table</h2> <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="#maintainers" id="id6">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h3><a class="toc-backref" href="#id1">Usage</a></h3> <p>Use this widget by saying:</p> <dl class="docutils"> <dt>&lt;field name=&quot;my_table&quot; widget=&quot;widget_table&quot; options=&quot;{</dt> <dd>'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']}&quot;/&gt;</dd> </dl> <p>&quot;my_table&quot; field must be of type char, it is only used to display the table. For example:</p> <dl class="docutils"> <dt>my_table = fields.Char(</dt> <dd>store=False)</dd> </dl> <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> <h3><a class="toc-backref" href="#id2">Bug Tracker</a></h3> <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 smash it by providing detailed and welcomed feedback.</p> <a name="credits"></a> <h3><a class="toc-backref" href="#id3">Credits</a></h3> <a name="authors"></a> <h4><a class="toc-backref" href="#id4">Authors</a></h4> <ul class="simple"> <li>Savoir-faire Linux</li> </ul> <a name="contributors"></a> <h4><a class="toc-backref" href="#id5">Contributors</a></h4> <ul class="simple"> <li>Luis Garcia (<a class="reference external" href="mailto:luis.garcia&#64;savoirfairelinux.com">luis.garcia&#64;savoirfairelinux.com</a>)</li> <li>Rim Ben Dhaou (<a class="reference external" href="mailto:rim.bendhaou&#64;savoirfairelinux.com">rim.bendhaou&#64;savoirfairelinux.com</a>)</li> <li>Larbi Gharib (<a class="reference external" href="mailto:larbi.gharib&#64;savoirfairelinux.com">larbi.gharib&#64;savoirfairelinux.com</a>)</li> <li>William Beverly (<a class="reference external" href="mailto:william.beverly&#64;savoirfairelinux.com">william.beverly&#64;savoirfairelinux.com</a>)</li> <li>Jananjoy Rajkumar (<a class="reference external" href="mailto:jananjoy.rajkumar&#64;savoirfairelinux.com">jananjoy.rajkumar&#64;savoirfairelinux.com</a>)</li> <li>Pierre Gault (<a class="reference external" href="mailto:pierre.gault&#64;savoirfairelinux.com">pierre.gault&#64;savoirfairelinux.com</a>)</li> </ul> <a name="maintainers"></a> <h4><a class="toc-backref" href="#id6">Maintainers</a></h4> <ul class="simple"> <li>Luis Garcia (<a class="reference external" href="mailto:luis.garcia&#64;savoirfairelinux.com">luis.garcia&#64;savoirfairelinux.com</a>)</li> <li>Larbi Gharib (<a class="reference external" href="mailto:larbi.gharib&#64;savoirfairelinux.com">larbi.gharib&#64;savoirfairelinux.com</a>)</li> </ul>