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.

52 lines
1.5 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 CSS ``max-height`` attribute,
  23. if you want to make the server return a resized, maybe to save data by making it
  24. return a smaller one or to have uniform images, use the
  25. ``resize="<width>,<height>"`` attribute.
  26. Credits
  27. =======
  28. Contributors
  29. ------------
  30. * Stefan Rijnhart
  31. * Leonardo Donelli <donelli@webmonks.it>
  32. Maintainer
  33. ----------
  34. .. image:: https://odoo-community.org/logo.png
  35. :alt: Odoo Community Association
  36. :target: https://odoo-community.org
  37. This module is maintained by the OCA.