Skip to content
Closed
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
92eae2c
[ADD] preliminary port of attachment_preview
hbrunn Jan 15, 2015
36ceae3
[IMP] have titles work everywhere
hbrunn Jan 15, 2015
2d3714c
[FIX] don't depend on document, the relevant code still lives in web
hbrunn Jan 15, 2015
eeee9b8
[ADD] translations
hbrunn Jan 15, 2015
70d79cb
[UPD] use viewerJS 0.5.4, incorporate new suported file types
hbrunn Jan 15, 2015
f1d6a84
[FIX] readme 8.0 style
hbrunn Jan 19, 2015
ae76aae
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
1abdeca
fix travis (flake8)
gurneyalex Mar 3, 2015
cc39e57
Slovene translations added
sysadminmatmoz Apr 13, 2015
807a188
[UPD] use viewerjs 0.5.7
hbrunn Jul 21, 2015
b1e57a7
Translations and templates sync
sysadminmatmoz Aug 3, 2015
0619df3
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
a17cdfb
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
8cc22d0
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
61c6a57
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
b4bf019
[MIG] attachment_preview: Migration to 11.0
tarteo Jul 11, 2018
f4d081f
[UPD] Update attachment_preview.pot
oca-travis Oct 23, 2018
e725cf9
[FIX] Robustness when attachment not present
astirpe Dec 17, 2018
306ec41
[IMP] attachment_preview: Split screen
tarteo Jan 10, 2019
e6c64b1
[FIX] pylint/javascript-lint
MiquelRForgeFlow Mar 11, 2019
271d86c
[MIG] attachment_preview: Migration to 12.0
tarteo Sep 20, 2019
8956020
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
89f5286
Update translation files
oca-transbot Aug 16, 2020
0b79ea1
fix the visibility of the preview area
khaeusler Jan 4, 2021
a40fe9a
attachment_preview 12.0.1.0.1
OCA-git-bot Feb 8, 2021
367822a
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Mar 14, 2021
c8a7521
[FIX] attachment_preview: start needs to return a promise
hbrunn Apr 30, 2021
dac1ed9
[UPD] hbrunn's mail address
hbrunn Apr 30, 2021
04de4e1
attachment_preview 12.0.1.0.2
OCA-git-bot Aug 10, 2021
5d85347
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
86dcba3
[IMP] attachment_preview: black, isort, prettier
vancouver29 Aug 23, 2022
96a8665
[MIG] attachment_preview: Migration to 15.0
vancouver29 Aug 23, 2022
411822d
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o…
vancouver29 Apr 17, 2023
e6a443a
Translated using Weblate (Spanish)
luis-ron Jun 5, 2023
2381381
Translated using Weblate (Italian)
mymage Jun 22, 2023
50b2e3f
[UPD] README.rst
OCA-git-bot Sep 3, 2023
1dd376d
[MIG] attachment_preview: Migration to 16.0
houzefa-abba Sep 25, 2023
80717b4
[MOV] attachment_preview: Reorganize JS modules
houzefa-abba Sep 29, 2023
8e6a26c
[IMP] attachment_preview: Disable base Odoo sidebar
houzefa-abba Apr 24, 2024
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
112 changes: 112 additions & 0 deletions attachment_preview/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
===================
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/15.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-15-0/knowledge-15-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=15.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.

.. image:: https://raw.githubusercontent.com/attachment_preview/static/description/screenshot-split.png
:alt: Screenshot of split form view
:width: 100%

**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.

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

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:%2015.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>

Other credits
~~~~~~~~~~~~~

Addon icon
----------

* courtesy of http://commons.wikimedia.org/wiki/Crystal_Clear

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

{
"name": "Preview attachments",
"version": "16.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_models/attachment_card.esm.js",
"attachment_preview/static/src/js/mail_models/attachment_list.esm.js",
"attachment_preview/static/src/js/web_views/binary_field.esm.js",
"attachment_preview/static/src/js/web_views/form_controller.esm.js",
"attachment_preview/static/src/js/web_views/form_renderer.esm.js",
"attachment_preview/static/src/scss/attachment_preview.scss",
"attachment_preview/static/src/xml/attachment_preview.xml",
],
"web.assets_frontend": [],
"web.assets_tests": [],
"web.qunit_suite_tests": [],
},
"installable": True,
}
41 changes: 41 additions & 0 deletions attachment_preview/i18n/attachment_preview.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 "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 ""
43 changes: 43 additions & 0 deletions attachment_preview/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 "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"
47 changes: 47 additions & 0 deletions attachment_preview/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 "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"
47 changes: 47 additions & 0 deletions attachment_preview/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 "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"
45 changes: 45 additions & 0 deletions attachment_preview/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: knowledge (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-08 08:32+0000\n"
"PO-Revision-Date: 2015-11-07 12:44+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Dutch (http://www.transifex.com/oca/OCA-knowledge-8-0/"
"language/nl/)\n"
"Language: nl\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"

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

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