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="color_field"</code> and <code>options="{'color_field': {'classes': 'className'}}"</code> or <code>options="{'color_field': {'code': 'hex code or color name'}}"</code> attribute in the field tag:</p>
<p><code>xml
...
<field name="arch" type="xml">
<tree string="View name">
...
<field name="name" widget="color_field" options="{'color_field': {'classes': 'text-danger'}}"/>
<field name="hexcodefield" widget="color_field" options="{'color_field': {'code': '#3c3c3c'}}"/>
<field name="colornamefield" widget="color_field" options="{'color_field': {'code': 'red'}}"/>
...
</tree>
</field>
...
</code></p>
<p>By default, you can use the following classes, these are bootstrap'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>