You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.5 KiB

  1. ===========================
  2. OpenERP web_widget_color module
  3. ===========================
  4. This module aims to add a color picker to openERP/Odoo.
  5. It's a `jsColor <http://jscolor.com/>`_ lib integration.
  6. Features
  7. ========
  8. * The picker allow the user to quickly select a color on edit mode
  9. |picker|
  10. .. note::
  11. Notice how html code and the background color is updating when selecting a color.
  12. * Display the color on form view when you are not editing it
  13. |formview|
  14. * Display the color on list view to quickly find what's wrong!
  15. |listview|
  16. Requirements
  17. ============
  18. This module has been ported to 8.0
  19. Usage
  20. =====
  21. It adds a new data type ``color``. To apply it, simply change the field
  22. declaration as following::
  23. _columns = {
  24. 'color': fields.char(
  25. u"Couleur",
  26. size=7,
  27. help=u"Toutes couleur valid css, exemple blue ou #f57900"
  28. ),
  29. }
  30. OR
  31. color = fields.Char(
  32. string="Color",
  33. size=7,
  34. help="Choose your color"
  35. )
  36. In the view declaration there is nothing especial to do,
  37. add the field as any other one. Here is a part of tree view example::
  38. ...
  39. <field name="arch" type="xml">
  40. <tree string="View name">
  41. ...
  42. <field name="name"/>
  43. <field name="color" widget="color"/>
  44. ...
  45. </tree>
  46. </field>
  47. ...
  48. .. |picker| image:: ./doc/picker.png
  49. .. |formview| image:: ./doc/form_view.png
  50. .. |listview| image:: ./doc/list_view.png