Search 1.9 billion lines of Odoo code on GitHub

web_customisable_date_format

Author: MONK Software
License: AGPL-3
Branch: 10.0-web_widget_date_format
Repository: monksoftware/web
Dependencies: web
Languages: JavaScript (18, 45.0%), Python (14, 35.0%), and XML (8, 20.0%)

<a class="reference external image-reference" 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.svg"> </a> <a name="customisable-date-format"></a> <h2>Customisable date format</h2> <p>This module adds the possibility to specify a rendering format for date and datetime fields, using MomentJS tokens.</p> <a name="configuration"></a> <h3>Configuration</h3> <p>No configuration necessary.</p> <a name="usage"></a> <h3>Usage</h3> <p>To use this module, first of all add it in the dependencies of your module, then:</p> <ul> <li><p class="first">In list view columns, use the <code>date_format=&quot;&lt;momentjs tokens&gt;&quot;</code> attribute on a date or datetime field, example:</p> <pre> <code>&lt;field name=&quot;start_date&quot; date_format=&quot;DD - dddd&quot;/&gt;</code> </pre> </li> <li><p class="first">In form fields, use the <code>options</code> attributes:</p> <pre> <code>&lt;field name=&quot;start_date&quot; options=&quot;{'date_format': 'DD - dddd'}&quot;/&gt;</code> </pre> </li> </ul> <p>You can find here the <a class="reference external" href="http://momentjs.com/docs/#/displaying/format/">list of valid MomentJS tokens</a>.</p> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/162/10.0-web_widget_date_format"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <a name="known-issues-roadmap"></a> <h3>Known issues / Roadmap</h3> <ul class="simple"> <li>Add support for datetime columns in tree views</li> </ul> <a name="bug-tracker"></a> <h3>Bug Tracker</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>Credits</h3> <a name="images"></a> <h4>Images</h4> <ul class="simple"> <li>Odoo Community Association: <a class="reference external" href="https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg">Icon</a>.</li> </ul> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>Leonardo Donelli &#64; MONKSoftware &lt;<a class="reference external" href="mailto:donelli&#64;webmonks.it">donelli&#64;webmonks.it</a>&gt;</li> </ul> <a name="funders"></a> <h4>Funders</h4> <p>The development of this module has been financially supported by:</p> <ul class="simple"> <li>MONK Software</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <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>This module is maintained by the OCA.</p> <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>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>