social/mail_preview_base/readme/USAGE.rst
Víctor Martínez a5709e6635 [MIG] mail_preview_base: Migration to 14.0
Co-authored-by: Enric Tobella <etobella@creublanca.es>
2022-02-02 11:28:09 +05:30

17 lines
457 B
ReStructuredText

Creating a new preview file
~~~~~~~~~~~~~~~~~~~~~~~~~~~
You need to add the configuration in three places:
* Function `_checkAttachment` and `_hasPreview` from `mail.DocumentViewer` on
Javascript
* Qweb template `DocumentViewer.Content`
To use this module, you need to:
#. Go to Settings > Technical > Attachments
#. Create attachment with image or pdf format
#. Show preview icon in "File content"
As an example, you can check `mail_preview_audio`.