Display Color Picker for Odoo 13.0 in HEX code.
Using library from awesome Bootstrap Colorpicker
- Display Color Picker for Odoo in HEX code.
- Display the color on form view when you are not editing it
- Display the color on form view when you editing it
- Display the color in tree view
- Field declaration.
color = fields.Char( string="Color Picker", )
- Declare in form view
<field name="arch" type="xml"> <form string="View name"> ... <field name="color" widget="colorpicker"/> ... </form> </field>
- Declare in tree view
<field name="arch" type="xml"> <tree string="View name"> ... <field name="color" widget="colorpicker"/> ... </form> </field>