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.

56 lines
1.7 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  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 ``height`` attribute. Default height is 16px.
  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. This module defines a new widget type for tree views columns.
  20. Set the attribute ``widget=image`` in a ``field`` tag in a tree view.
  21. You can also set ``height=<height>`` to set the height the image will have.
  22. Note that this just sets the image ``height`` attribute,
  23. if you want to make the server return a resized image, maybe to reduce the size
  24. of the transferred file or to have uniform images, use the
  25. ``resize="<width>,<height>"`` attribute.
  26. You can set ``display=icon`` in order to get a clickable picture icon that will
  27. open a full screen preview of the image. Set ``display=thumbnail`` to get a
  28. clickable thumbnail.
  29. Credits
  30. =======
  31. Contributors
  32. ------------
  33. * Stefan Rijnhart
  34. * Leonardo Donelli <donelli@webmonks.it>
  35. Maintainer
  36. ----------
  37. .. image:: https://odoo-community.org/logo.png
  38. :alt: Odoo Community Association
  39. :target: https://odoo-community.org
  40. This module is maintained by the OCA.