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.

59 lines
1.9 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
  2. :alt: License: AGPL-3
  3. =====================================
  4. Display images and icons in tree view
  5. =====================================
  6. This module defines a tree image widget, to be used with either binary fields
  7. or (function) fields of type character. Use ``widget='image'`` in your view
  8. definition. Optionally, set a ``width`` attribute. Default width is 30px.
  9. If you use the widget with a character field, the content of the field can be
  10. any of the following:
  11. * The absolute or relative location of an image. For example,
  12. "/<module>/static/src/img/youricon.png"
  13. * A standard icon from the web distribution, without path or extension, For
  14. example, 'gtk-open'
  15. * A dynamic image in a data url base 64 format. Prefix with
  16. 'data:image/png;base64,'
  17. Usage
  18. =====
  19. Set the attribute ``widget=image`` in a ``field`` tag in a tree view.
  20. You can also set ``height=<height>`` to set the height the image will have.
  21. Note that this just sets the CSS ``max-height`` attribute,
  22. if you want to make the server return a resized, maybe to save data by making it
  23. return a smaller one or to have uniform images, use the
  24. ``resize="<width>,<height>"`` attribute.
  25. Credits
  26. =======
  27. Contributors
  28. ------------
  29. * Stefan Rijnhart
  30. * Leonardo Donelli <donelli@webmonks.it>
  31. * Jay Vora <jay.vora@serpentcs.com>
  32. * Meet Dholakia <m.dholakia.serpentcs@gmail.com>
  33. * Nikul Chaudhary <nikul.chaudhary.serpentcs@gmail.com>
  34. Maintainer
  35. ----------
  36. .. image:: https://odoo-community.org/logo.png
  37. :alt: Odoo Community Association
  38. :target: https://odoo-community.org
  39. This module is maintained by the OCA.
  40. OCA, or the Odoo Community Association, is a nonprofit organization whose
  41. mission is to support the collaborative development of Odoo features and
  42. promote its widespread use.
  43. To contribute to this module, please visit https://odoo-community.org.