Search 1.9 billion lines of Odoo code on GitHub

web_widget_color_field

Author: Ruter <i@ruterly.com>
License: AGPL-3
Branch: 10.0
Repository: jason156/TNK-Odoo-Module
Dependencies: base, and web
Languages: HTML (18, 14.4%), JavaScript (45, 36.0%), Markdown (31, 24.8%), Python (22, 17.6%), and XML (9, 7.2%)
Other repositories: minhhq09/TNK-Odoo-Module, ruter/TNK-Odoo-Module, sc4you/TNK-Odoo-Module, and truongn/TNK-Odoo-Module

<p><img src="https://img.shields.io/badge/license-AGPL--3-blue.svg" alt="License: AGPL-3"></p> <h1>Colorful column in list views</h1> <p>This module can make the columns in list views colorful.</p> <p>You can specify any exist classes or hex color code as widget options to the field.</p> <h1>Usage</h1> <p>In the list view declaration, put <code>widget=&quot;color_field&quot;</code> and <code>options=&quot;{&#39;color_field&#39;: {&#39;classes&#39;: &#39;className&#39;}}&quot;</code> or <code>options=&quot;{&#39;color_field&#39;: {&#39;code&#39;: &#39;hex code or color name&#39;}}&quot;</code> attribute in the field tag:</p> <p><code>xml ... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;tree string=&quot;View name&quot;&gt; ... &lt;field name=&quot;name&quot; widget=&quot;color_field&quot; options=&quot;{&#39;color_field&#39;: {&#39;classes&#39;: &#39;text-danger&#39;}}&quot;/&gt; &lt;field name=&quot;hexcodefield&quot; widget=&quot;color_field&quot; options=&quot;{&#39;color_field&#39;: {&#39;code&#39;: &#39;#3c3c3c&#39;}}&quot;/&gt; &lt;field name=&quot;colornamefield&quot; widget=&quot;color_field&quot; options=&quot;{&#39;color_field&#39;: {&#39;code&#39;: &#39;red&#39;}}&quot;/&gt; ... &lt;/tree&gt; &lt;/field&gt; ... </code></p> <p>By default, you can use the following classes, these are bootstrap&#39;s helper-classes:</p> <ul> <li><code>text-muted</code></li> <li><code>text-primary</code></li> <li><code>text-success</code></li> <li><code>text-info</code></li> <li><code>text-warning</code></li> <li><code>text-danger</code></li> </ul> <h1>Screenshot</h1> <p><img src="https://github.com/ruter/TNK-Odoo-Module/blob/10.0/web_widget_color_field/static/description/screenshot0.png?raw=true" alt="Add attributes in field tag"></p> <p><img src="https://github.com/ruter/TNK-Odoo-Module/blob/10.0/web_widget_color_field/static/description/screenshot.png?raw=true" alt="Colorful columns in list view"></p> <h1>Contributors</h1> <ul> <li>Ruter <a href="mailto:i@ruterly.com">i@ruterly.com</a></li> </ul>