Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] attachment_preview: Migration to 16.0 #514

Draft
wants to merge 28 commits into
base: 16.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
55a6b3b
[ADD] preliminary port of attachment_preview
hbrunn Jan 15, 2015
ecb10a9
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
79bea84
Slovene translations added
sysadminmatmoz Apr 13, 2015
947f31d
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
1e24cd4
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
3d42b35
[MIG] attachment_preview: Migration to 11.0
tarteo Jul 11, 2018
a7391f0
[UPD] README.rst
OCA-git-bot Oct 23, 2018
77a20f3
[UPD] Update attachment_preview.pot
oca-travis Oct 23, 2018
22c9aa5
[FIX] Robustness when attachment not present
astirpe Dec 17, 2018
0408c85
[IMP] attachment_preview: Split screen
tarteo Jan 10, 2019
6460442
[UPD] README.rst
OCA-git-bot Jan 14, 2019
863fc91
[FIX] pylint/javascript-lint
MiquelRForgeFlow Mar 11, 2019
85e4fa3
[MIG] attachment_preview: Migration to 12.0
tarteo Sep 20, 2019
290c389
[UPD] Update attachment_preview.pot
oca-travis Jul 15, 2020
1bf8179
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 11, 2020
6ef6feb
Update translation files
oca-transbot Aug 16, 2020
d1bdde5
fix the visibility of the preview area
khaeusler Jan 4, 2021
8d8ebf7
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Mar 14, 2021
7369927
[FIX] attachment_preview: start needs to return a promise
hbrunn Apr 30, 2021
57ef68f
Added translation using Weblate (Turkish)
yavuzavci Jan 6, 2022
1ee243d
[IMP] attachment_preview: black, isort, prettier
vancouver29 Aug 23, 2022
e3debed
[MIG] attachment_preview: Migration to 15.0
vancouver29 Aug 23, 2022
ace9e3e
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o…
vancouver29 Apr 17, 2023
ffa4ff9
[UPD] Update attachment_preview.pot
Apr 18, 2023
6b6a333
Translated using Weblate (Spanish)
luis-ron Jun 5, 2023
322ee99
Translated using Weblate (Italian)
mymage Jun 22, 2023
3b9c5fd
[IMP] attachment_preview: pre-commit execution
anusriNPS Jan 2, 2025
b7404e2
[MIG] attachment_preview: Migration to 16.0
anusriNPS Jan 2, 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
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/16.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-16-0/knowledge-16-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=16.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:%2016.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/16.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": "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/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",
"attachment_preview/static/src/xml/attachment_preview.xml",
],
"web.assets_frontend": [],
"web.assets_tests": [],
"web.qunit_suite_tests": [],
},
"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
Loading