Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f7b7eff
[ADD] preliminary port of attachment_preview
hbrunn Jan 15, 2015
47b1c9d
[IMP] have titles work everywhere
hbrunn Jan 15, 2015
bb7476e
[FIX] don't depend on document, the relevant code still lives in web
hbrunn Jan 15, 2015
ce6f4c8
[ADD] translations
hbrunn Jan 15, 2015
e948e35
[UPD] use viewerJS 0.5.4, incorporate new suported file types
hbrunn Jan 15, 2015
c56e671
[FIX] readme 8.0 style
hbrunn Jan 19, 2015
fc07b12
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
54b64c2
fix travis (flake8)
gurneyalex Mar 3, 2015
d0b2e80
Slovene translations added
sysadminmatmoz Apr 13, 2015
eb96be9
[UPD] use viewerjs 0.5.7
hbrunn Jul 21, 2015
1ecff09
Translations and templates sync
sysadminmatmoz Aug 3, 2015
43ce318
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
2f4a4fd
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
53dd6e9
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
c6a4251
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
b3c3f40
[MIG] attachment_preview: Migration to 11.0
tarteo Jul 11, 2018
1d35cfb
[UPD] README.rst
OCA-git-bot Oct 23, 2018
5fd69b0
[UPD] Update attachment_preview.pot
oca-travis Oct 23, 2018
f2f0bfd
[FIX] Robustness when attachment not present
astirpe Dec 17, 2018
713062b
[IMP] attachment_preview: Split screen
tarteo Jan 10, 2019
bbde279
[UPD] README.rst
OCA-git-bot Jan 14, 2019
c48c276
[UPD] Update attachment_preview.pot
oca-travis Jan 14, 2019
79b4957
Update translation files
oca-transbot Jan 27, 2019
4c3d791
[FIX] pylint/javascript-lint
MiquelRForgeFlow Mar 11, 2019
9fdbbf1
[UPD] Update attachment_preview.pot
oca-travis Mar 11, 2019
d250f2a
Update translation files
oca-transbot Mar 17, 2019
630e17f
[UPD] README.rst
OCA-git-bot Jul 29, 2019
f4070f2
[MIG] attachment_preview: Migration to 12.0
tarteo Sep 20, 2019
b2fcf34
[UPD] Update attachment_preview.pot
oca-travis Jul 15, 2020
07b3e28
[UPD] README.rst
OCA-git-bot Jul 15, 2020
176161b
Update translation files
oca-transbot Jul 15, 2020
0e428a4
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
3f08cb7
Update translation files
oca-transbot Aug 16, 2020
31804b7
fix the visibility of the preview area
khaeusler Jan 4, 2021
30ea430
attachment_preview 12.0.1.0.1
OCA-git-bot Feb 8, 2021
9998212
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Mar 14, 2021
04738c6
[FIX] attachment_preview: start needs to return a promise
hbrunn Apr 30, 2021
a962f41
[UPD] hbrunn's mail address
hbrunn Apr 30, 2021
2f963e0
[UPD] README.rst
OCA-git-bot Aug 10, 2021
1d7b40b
attachment_preview 12.0.1.0.2
OCA-git-bot Aug 10, 2021
fbfe8f2
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
dcef341
Translated using Weblate (Turkish)
yavuzavci Jan 6, 2022
2c8d04f
[IMP] attachment_preview: black, isort, prettier
vancouver29 Aug 23, 2022
51dbf6e
[MIG] attachment_preview: Migration to 15.0
vancouver29 Aug 23, 2022
2658f13
Merge remote-tracking branch 'origin/15.0' into 15.0-mig-attachment_p…
vancouver29 Mar 13, 2023
0bce1f3
[MIG] attachment_preview: Migration to 15.0
vancouver29 Mar 14, 2023
e7c0e9d
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o…
vancouver29 Apr 17, 2023
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
109 changes: 109 additions & 0 deletions attachment_preview/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
===================
Preview attachments
===================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/12.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-12-0/knowledge-12-0-attachment_preview
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/118/12.0
:alt: Try me on Runbot

|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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2012.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/12.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
29 changes: 29 additions & 0 deletions attachment_preview/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Preview attachments",
"version": "15.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/models/attachment_card/attachment_card.esm.js",
"attachment_preview/static/src/js/attachmentPreviewWidget.esm.js",
"attachment_preview/static/src/js/components/chatter/chatter.esm.js",
"attachment_preview/static/src/scss/attachment_preview.scss",
],
"web.assets_frontend": [],
"web.assets_tests": [],
"web.qunit_suite_tests": [],
"web.assets_qweb": ["attachment_preview/static/src/xml/attachment_preview.xml"],
},
"installable": True,
}
43 changes: 43 additions & 0 deletions attachment_preview/i18n/attachment_preview.pot
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:25+0000\n"
"PO-Revision-Date: 2022-08-23 14:25+0000\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.js:0
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.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"
"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.js:0
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
#, python-format
msgid "Preview %s"
msgstr "Vorschau %s"
33 changes: 33 additions & 0 deletions attachment_preview/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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: 2016-01-25 18:15+0000\n"
"Last-Translator: Antonio Trueba\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"

#. 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/js/attachment_preview.js:188
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
#, python-format
msgid "Preview %s"
msgstr "Previsualizar %s"
33 changes: 33 additions & 0 deletions attachment_preview/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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: 2016-03-13 16:56+0000\n"
"Last-Translator: Paolo Valier\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"

#. 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/js/attachment_preview.js:188
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
#, python-format
msgid "Preview %s"
msgstr "Anteprima %s"
32 changes: 32 additions & 0 deletions attachment_preview/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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/js/attachment_preview.js:188
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
#, python-format
msgid "Preview %s"
msgstr "Voorbeeld %s"
28 changes: 28 additions & 0 deletions attachment_preview/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: pt_BR\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/js/attachment_preview.js:188
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
#, python-format
msgid "Preview %s"
msgstr ""
33 changes: 33 additions & 0 deletions attachment_preview/i18n/pt_PT.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
# Translators:
# Pedro Castro Silva <pedrocs@sossia.pt>, 2016
msgid ""
msgstr ""
"Project-Id-Version: knowledge (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-07 16:07+0000\n"
"PO-Revision-Date: 2016-05-22 22:19+0000\n"
"Last-Translator: Pedro Castro Silva <pedrocs@sossia.pt>\n"
"Language-Team: Portuguese (Portugal) (http://www.transifex.com/oca/OCA-"
"knowledge-8-0/language/pt_PT/)\n"
"Language: pt_PT\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/js/attachment_preview.js:188
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
#, python-format
msgid "Preview %s"
msgstr "Antever %s"
Loading