Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0d1f135
[ADD] preliminary port of attachment_preview
hbrunn Jan 15, 2015
a969869
[IMP] have titles work everywhere
hbrunn Jan 15, 2015
02eb4d2
[FIX] don't depend on document, the relevant code still lives in web
hbrunn Jan 15, 2015
85aaa6f
[ADD] translations
hbrunn Jan 15, 2015
9c01125
[UPD] use viewerJS 0.5.4, incorporate new suported file types
hbrunn Jan 15, 2015
5ec7398
[FIX] readme 8.0 style
hbrunn Jan 19, 2015
eb3be47
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
7d36ed0
fix travis (flake8)
gurneyalex Mar 3, 2015
a8129b8
Slovene translations added
sysadminmatmoz Apr 13, 2015
d627907
[UPD] use viewerjs 0.5.7
hbrunn Jul 21, 2015
f13e6ef
Translations and templates sync
sysadminmatmoz Aug 3, 2015
968d9fc
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
9e4a53c
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
34e5ee1
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
e8f9ed2
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
eebb952
[MIG] attachment_preview: Migration to 11.0
tarteo Jul 11, 2018
ec68d3a
[FIX] Robustness when attachment not present
astirpe Dec 17, 2018
fd8fdc2
[IMP] attachment_preview: Split screen
tarteo Jan 10, 2019
24fd473
[FIX] pylint/javascript-lint
MiquelRForgeFlow Mar 11, 2019
9c9a311
[MIG] attachment_preview: Migration to 12.0
tarteo Sep 20, 2019
54e48e0
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
5ca7e39
fix the visibility of the preview area
khaeusler Jan 4, 2021
d7f5f35
attachment_preview 12.0.1.0.1
OCA-git-bot Feb 8, 2021
3065aba
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Mar 14, 2021
a8331b6
[FIX] attachment_preview: start needs to return a promise
hbrunn Apr 30, 2021
019ee65
[UPD] hbrunn's mail address
hbrunn Apr 30, 2021
b180c71
attachment_preview 12.0.1.0.2
OCA-git-bot Aug 10, 2021
1164f1f
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
416d3a7
Translated using Weblate (Turkish)
yavuzavci Jan 6, 2022
dd9db90
[IMP] attachment_preview: black, isort, prettier
vancouver29 Aug 23, 2022
b5e9d06
[MIG] attachment_preview: Migration to 15.0
vancouver29 Aug 23, 2022
a753fce
[MIG] attachment_preview: Migration to 15.0
vancouver29 Mar 14, 2023
b334d72
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o…
vancouver29 Apr 17, 2023
9383e96
Update translation files
weblate Apr 18, 2023
60d70d3
Translated using Weblate (Spanish)
luis-ron Jun 5, 2023
88b7a5d
Translated using Weblate (Italian)
mymage Jun 22, 2023
11225a3
Update translation files
weblate Apr 25, 2024
dbedf07
[IMP] attachment_preview: pre-commit auto fixes
ByteMeAsap Jul 3, 2025
ea7cefd
[MIG] attachment_preview: Migration to 18.0
ByteMeAsap Jul 15, 2025
48d7c89
[UPD] Update attachment_preview.pot
Dec 31, 2025
35218b3
[BOT] post-merge updates
OCA-git-bot Dec 31, 2025
6abfa09
Translated using Weblate (Italian)
mymage Jan 10, 2026
091d58a
[MIG] attachment_preview: Migration to 19.0
gregory-rutecki Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 111 additions & 0 deletions attachment_preview/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================
Preview attachments
===================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e9abcd982f1b988dc4c79d2c451320fddb5fc1289f44e8b7c178c917b2bd4d1e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
:target: https://github.com/OCA/knowledge/tree/18.0/attachment_preview
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-attachment_preview
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This addon allows to preview attachments supported by
http://viewerjs.org.

Currently, that's most Libreoffice files and PDFs.

|Screenshot of split form view|

.. |Screenshot of split form view| image:: https://raw.githubusercontent.com/attachment_preview/static/description/screenshot-split.png

**Table of contents**

.. contents::
:local:

Installation
============

For filetype recognition, you'll get the best results by installing
``python-magic``:

sudo apt-get install python-magic

Usage
=====

The module adds a little print preview icon right of download links for
attachments or binary fields. When a preview is opened from the
attachments menu it's shown next to the form view. From this screen you
can navigate through the attachments using the arrow buttons. Using the
pop-out button next to the navigational buttons you can open the preview
in a separate window.

|Screenshot navigator|

.. |Screenshot navigator| image:: https://raw.githubusercontent.com/attachment_preview/static/description/screenshot-paginator.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Therp BV
* Onestein

Contributors
------------

- Holger Brunn <mail@hunki-enterprises.com>
- Dennis Sluijk <d.sluijk@onestein.nl>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/18.0/attachment_preview>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions attachment_preview/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
30 changes: 30 additions & 0 deletions attachment_preview/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Preview attachments",
"version": "19.0.1.0.0",
"author": "Therp BV,Onestein,Odoo Community Association (OCA)",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"author": "Therp BV, Onestein, Odoo Community Association (OCA)",
Can you fix the spacing, please?

"website": "https://github.com/OCA/knowledge",
"license": "AGPL-3",
"summary": "Preview attachments supported by Viewer.js",
"category": "Knowledge Management",
"depends": ["web", "mail"],
"data": [],
"qweb": [],
"assets": {
"web._assets_primary_variables": [],
"web.assets_backend": [
"attachment_preview/static/src/js/attachmentPreviewWidget.esm.js",
"attachment_preview/static/src/js/utils.esm.js",
"attachment_preview/static/src/js/mail_core/attachment_list.esm.js",
"attachment_preview/static/src/js/web_views/fields/binary_field.esm.js",
"attachment_preview/static/src/js/web_views/form/form_compiler.esm.js",
"attachment_preview/static/src/js/web_views/form/form_controller.esm.js",
"attachment_preview/static/src/js/web_views/form/form_renderer.esm.js",
"attachment_preview/static/src/scss/attachment_preview.scss",
"attachment_preview/static/src/xml/attachment_preview.xml",
],
},
"installable": True,
}
37 changes: 37 additions & 0 deletions attachment_preview/i18n/attachment_preview.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: attachment_preview
#: model:ir.model,name:attachment_preview.model_ir_attachment
msgid "Attachment"
msgstr ""

#. module: attachment_preview
#. odoo-javascript
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
msgid "Open in new page"
msgstr ""

#. module: attachment_preview
#. odoo-javascript
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
msgid "Preview"
msgstr ""

#. module: attachment_preview
#. odoo-javascript
#: code:addons/attachment_preview/static/src/js/web_views/fields/binary_field.esm.js:0
msgid "Preview %s"
msgstr ""
57 changes: 57 additions & 0 deletions attachment_preview/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-23 14:27+0000\n"
"PO-Revision-Date: 2022-08-23 14:27+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: attachment_preview
#: model:ir.model,name:attachment_preview.model_ir_attachment
msgid "Attachment"
msgstr "Dateianhang"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open in new page"
msgstr "In neuer Seite öffnen"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open preview {{attachmentCard.attachment.name}} in a new tab"
msgstr ""

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview"
msgstr "Vorschau"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
#, python-format
msgid "Preview %s"
msgstr "Vorschau %s"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview {{attachmentCard.attachment.displayName}} in side panel"
msgstr ""
61 changes: 61 additions & 0 deletions attachment_preview/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
# Translators:
# Antonio Trueba, 2016
msgid ""
msgstr ""
"Project-Id-Version: knowledge (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-19 10:18+0000\n"
"PO-Revision-Date: 2023-06-05 17:08+0000\n"
"Last-Translator: luis-ron <luis.ron@sygel.es>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-knowledge-8-0/"
"language/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: attachment_preview
#: model:ir.model,name:attachment_preview.model_ir_attachment
msgid "Attachment"
msgstr "Archivo adjunto"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open in new page"
msgstr "Abrir en página nueva"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open preview {{attachmentCard.attachment.name}} in a new tab"
msgstr ""

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview"
msgstr "Vista previa"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
#, python-format
msgid "Preview %s"
msgstr "Previsualizar %s"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview {{attachmentCard.attachment.displayName}} in side panel"
msgstr ""
62 changes: 62 additions & 0 deletions attachment_preview/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
# Translators:
# Paolo Valier, 2016
msgid ""
msgstr ""
"Project-Id-Version: knowledge (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-05 11:50+0000\n"
"PO-Revision-Date: 2026-01-10 10:42+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: Italian (http://www.transifex.com/oca/OCA-knowledge-8-0/"
"language/it/)\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.4\n"

#. module: attachment_preview
#: model:ir.model,name:attachment_preview.model_ir_attachment
msgid "Attachment"
msgstr "Allegato"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open in new page"
msgstr "Apri in una pagina nuova"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open preview {{attachmentCard.attachment.name}} in a new tab"
msgstr "Apri anteprima {{attachmentCard.attachment.name}} in una nuova scheda"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview"
msgstr "Anteprima"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
#, python-format
msgid "Preview %s"
msgstr "Anteprima %s"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Preview {{attachmentCard.attachment.displayName}} in side panel"
msgstr ""
"Anteprima {{attachmentCard.attachment.displayName}} nel pannello laterale"
Loading
Loading