Author: |
ACSONE SA/NV, Odoo Community Association (OCA) |
License: |
no license |
Branch: |
8.0-ADD-web_widget_iframe |
Repository: |
acsone/web |
Dependencies: |
web |
Languages: |
CSS (53, 28.5%),
JavaScript (22, 11.8%),
Python (17, 9.1%),
XML (34, 18.3%),
and
reStructuredText (60, 32.3%) |
Other branches: |
10.0-add_web_widget_iframe-bwi |
<a name="color-widget-for-odoo-web-client"></a>
<h2>Color widget for Odoo web client</h2>
<p>This module aims to add a color picker to Odoo.</p>
<p>It's a <a class="reference external" href="http://jscolor.com/">jsColor</a> lib integration.</p>
<a name="features"></a>
<h2>Features</h2>
<ul>
<li><p class="first">The picker allow the user to quickly select a color on edit mode</p>
<p><img alt="picker" src="./images/picker.png" /></p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Notice how html code and the background color is updating when selecting a color.</p>
</div>
</li>
<li><p class="first">Display the color on form view when you are not editing it</p>
<p><img alt="formview" src="./images/form_view.png" /></p>
</li>
<li><p class="first">Display the color on list view to quickly find what's wrong!</p>
<p><img alt="listview" src="./images/list_view.png" /></p>
</li>
</ul>
<a name="requirements"></a>
<h2>Requirements</h2>
<p>This module has been ported to 8.0</p>
<a name="usage"></a>
<h2>Usage</h2>
<p>You need to declare a char field of at least size 7:</p>
<pre>
<code>_columns = {
'color': fields.char(
u"Couleur",
help=u"Toutes couleur valid css, exemple blue ou #f57900"
),
}
OR
color = fields.Char(
string="Color",
help="Choose your color"
)</code>
</pre>
<p>In the view declaration, put widget='color' attribute in the field tag:</p>
<pre>
<code>...
<field name="arch" type="xml">
<tree string="View name">
...
<field name="name"/>
<field name="color" widget="color"/>
...
</tree>
</field>
...</code>
</pre>
<a name="bug-tracker"></a>
<h2>Bug Tracker</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 feedback
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_color%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">here</a>.</p>
<a name="credits"></a>
<h2>Credits</h2>
<a name="contributors"></a>
<h3>Contributors</h3>
<ul class="simple">
<li>Adil Houmadi <<a class="reference external" href="mailto:adil.houmadi@gmail.com">adil.houmadi@gmail.com</a>></li>
</ul>
<a name="maintainer"></a>
<h3>Maintainer</h3>
<a class="reference external image-reference" href="http://odoo-community.org"><img alt="Odoo Community Association" src="http://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="http://odoo-community.org">http://odoo-community.org</a>.</p>