Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2ead898
[ADD] preliminary port of attachment_preview
hbrunn Jan 15, 2015
8379e03
[IMP] have titles work everywhere
hbrunn Jan 15, 2015
e3ce9fc
[FIX] don't depend on document, the relevant code still lives in web
hbrunn Jan 15, 2015
9224f52
[ADD] translations
hbrunn Jan 15, 2015
0a31de8
[UPD] use viewerJS 0.5.4, incorporate new suported file types
hbrunn Jan 15, 2015
659a484
[FIX] readme 8.0 style
hbrunn Jan 19, 2015
7e3ed8c
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
197dc3c
fix travis (flake8)
gurneyalex Mar 3, 2015
d846ea0
Slovene translations added
sysadminmatmoz Apr 13, 2015
6622bfc
[UPD] use viewerjs 0.5.7
hbrunn Jul 21, 2015
5d73bc0
Translations and templates sync
sysadminmatmoz Aug 3, 2015
a743216
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
5a69211
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
989e557
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
463a2b5
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
e2f1482
[MIG] attachment_preview: Migration to 11.0
tarteo Jul 11, 2018
8c62754
[FIX] Robustness when attachment not present
astirpe Dec 17, 2018
2fb664d
[IMP] attachment_preview: Split screen
tarteo Jan 10, 2019
339a461
[FIX] pylint/javascript-lint
MiquelRForgeFlow Mar 11, 2019
ced0c21
[MIG] attachment_preview: Migration to 12.0
tarteo Sep 20, 2019
33a6f42
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
5830c99
fix the visibility of the preview area
khaeusler Jan 4, 2021
ec11470
attachment_preview 12.0.1.0.1
OCA-git-bot Feb 8, 2021
ce5f32b
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Mar 14, 2021
caf63aa
[FIX] attachment_preview: start needs to return a promise
hbrunn Apr 30, 2021
574d93e
[UPD] hbrunn's mail address
hbrunn Apr 30, 2021
6a6cb21
attachment_preview 12.0.1.0.2
OCA-git-bot Aug 10, 2021
9e95bed
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
9026a1f
Translated using Weblate (Turkish)
yavuzavci Jan 6, 2022
05c8c60
[IMP] attachment_preview: black, isort, prettier
vancouver29 Aug 23, 2022
3175ce3
[MIG] attachment_preview: Migration to 15.0
vancouver29 Aug 23, 2022
f578ff0
[MIG] attachment_preview: Migration to 15.0
vancouver29 Mar 14, 2023
f6fc8da
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o…
vancouver29 Apr 17, 2023
1ce81c4
Update translation files
weblate Apr 18, 2023
2a74a6d
Translated using Weblate (Spanish)
luis-ron Jun 5, 2023
3bb24e2
Translated using Weblate (Italian)
mymage Jun 22, 2023
4f0bf1e
Update translation files
weblate Apr 25, 2024
ba7e2f5
[IMP] attachment_preview: pre-commit auto fixes
ByteMeAsap Jul 3, 2025
b7f83ed
[MIG] attachment_preview: Migration to 18.0
ByteMeAsap Jul 15, 2025
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
107 changes: 107 additions & 0 deletions attachment_preview/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
===================
Preview attachments
===================

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

.. |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/licence-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": "18.0.1.0.0",
"author": "Therp BV," "Onestein," "Odoo Community Association (OCA)",
"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,
}
55 changes: 55 additions & 0 deletions attachment_preview/i18n/attachment_preview.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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"
"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
#. openerp-web
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
#, python-format
msgid "Open in new page"
msgstr ""

#. 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 ""

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

#. 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 ""
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 ""
61 changes: 61 additions & 0 deletions attachment_preview/i18n/it.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:
# 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: 2023-06-22 15:08+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 4.17\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 ""

#. 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 ""
Loading