Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ addons:
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow
- python-magic

language: python

Expand Down
87 changes: 75 additions & 12 deletions attachment_preview/README.rst
Original file line number Diff line number Diff line change
@@ -1,46 +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/10.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-10-0/knowledge-10-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/10.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:: /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``::
``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.
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:: /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:%2010.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
=======

Addon icon
----------
Authors
~~~~~~~

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

Contributors
------------
~~~~~~~~~~~~

* Holger Brunn <hbrunn@therp.nl>
* Dennis Sluijk <d.sluijk@onestein.nl>

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

Maintainer
Addon icon
----------

.. image:: http://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: http://odoo-community.org
* courtesy of http://commons.wikimedia.org/wiki/Crystal_Clear

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

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.
.. 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/10.0/attachment_preview>`_ project on GitHub.

To contribute to this module, please visit http://odoo-community.org.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
25 changes: 4 additions & 21 deletions attachment_preview/__init__.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import model
# Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
43 changes: 10 additions & 33 deletions attachment_preview/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2014 Therp BV (<http://therp.nl>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Preview attachments",
"version": "8.0.1.1.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"version": "10.0.1.3.0",
"author": "Therp BV,"
"Onestein,"
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"complexity": "normal",
'summary': 'Preview attachments supported by Viewer.js',
"summary": 'Preview attachments supported by Viewer.js',
"category": "Knowledge Management",
"depends": [
'web',
],
"data": [
"view/attachment_preview.xml",
"templates/assets.xml",
],
"qweb": [
'static/src/xml/attachment_preview.xml',
],
"test": [
],
"auto_install": False,
'installable': False,
"application": False,
"external_dependencies": {
'python': [],
},
"installable": True,
}
28 changes: 28 additions & 0 deletions attachment_preview/i18n/de.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
#
# Translators:
# Rudolf Schnapka <rs@techno-flex.de>, 2015
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-25 09:41+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-knowledge-8-0/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:184
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:226
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:228
#, python-format
msgid "Preview %s"
msgstr "Vorschau %s"
28 changes: 28 additions & 0 deletions attachment_preview/i18n/es.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
#
# 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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:184
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:226
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:228
#, python-format
msgid "Preview %s"
msgstr "Previsualizar %s"
28 changes: 28 additions & 0 deletions attachment_preview/i18n/it.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
#
# 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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:184
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:226
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:228
#, python-format
msgid "Preview %s"
msgstr "Anteprima %s"
24 changes: 13 additions & 11 deletions attachment_preview/i18n/nl.po
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * attachment_preview
#
# * attachment_preview
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Project-Id-Version: knowledge (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-15 11:04+0000\n"
"PO-Revision-Date: 2015-08-03 13:36+0200\n"
"Last-Translator: <>\n"
"Language-Team: \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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Content-Transfer-Encoding: \n"
"Language: nl\n"
"X-Generator: Poedit 1.8.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: attachment_preview
#. openerp-web
#: code:multiple:42
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:184
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:226
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:228
#, python-format
msgid "Preview %s"
msgstr "Voorbeeld %s"
28 changes: 28 additions & 0 deletions attachment_preview/i18n/pt_PT.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
#
# 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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_PT\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: attachment_preview
#. openerp-web
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:184
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:226
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:228
#, python-format
msgid "Preview %s"
msgstr "Antever %s"
Loading