/odoo_widget_colorpicker

widget color picker for odoo 13

Primary LanguageJavaScript

Color Picker widget for Odoo web client

Display Color Picker for Odoo 13.0 in HEX code.
Using library from awesome Bootstrap Colorpicker

bootstrap-colorpicker

Features

  • Display Color Picker for Odoo in HEX code.

  • Display the color on form view when you are not editing it
    not editing

  • Display the color on form view when you editing it
    editing

  • Display the color in tree view
    editing

Usage

  1. Field declaration.
    color = fields.Char(
        string="Color Picker",
    )
    

  2. Declare in form view
    <field name="arch" type="xml">
        <form string="View name">
            ...
            <field name="color" widget="colorpicker"/>
            ...
        </form>
    </field>
    

  3. Declare in tree view
    <field name="arch" type="xml">
        <tree string="View name">
            ...
            <field name="color" widget="colorpicker"/>
            ...
        </form>
    </field>