OCA-git-bot
4 years ago
44 changed files with 1903 additions and 1 deletions
-
2.travis.yml
-
117report_qweb_pdf_watermark/README.rst
-
4report_qweb_pdf_watermark/__init__.py
-
20report_qweb_pdf_watermark/__manifest__.py
-
34report_qweb_pdf_watermark/demo/report.xml
-
47report_qweb_pdf_watermark/i18n/ca.po
-
47report_qweb_pdf_watermark/i18n/da.po
-
54report_qweb_pdf_watermark/i18n/de.po
-
48report_qweb_pdf_watermark/i18n/el_GR.po
-
54report_qweb_pdf_watermark/i18n/es.po
-
48report_qweb_pdf_watermark/i18n/es_CO.po
-
51report_qweb_pdf_watermark/i18n/fr.po
-
47report_qweb_pdf_watermark/i18n/gl.po
-
50report_qweb_pdf_watermark/i18n/hr.po
-
54report_qweb_pdf_watermark/i18n/hr_HR.po
-
51report_qweb_pdf_watermark/i18n/it.po
-
48report_qweb_pdf_watermark/i18n/nb_NO.po
-
51report_qweb_pdf_watermark/i18n/nl_NL.po
-
48report_qweb_pdf_watermark/i18n/pl.po
-
47report_qweb_pdf_watermark/i18n/pt.po
-
48report_qweb_pdf_watermark/i18n/pt_BR.po
-
52report_qweb_pdf_watermark/i18n/pt_PT.po
-
41report_qweb_pdf_watermark/i18n/report_qweb_pdf_watermark.pot
-
48report_qweb_pdf_watermark/i18n/sl.po
-
49report_qweb_pdf_watermark/i18n/tr.po
-
48report_qweb_pdf_watermark/i18n/tr_TR.po
-
4report_qweb_pdf_watermark/models/__init__.py
-
122report_qweb_pdf_watermark/models/report.py
-
5report_qweb_pdf_watermark/readme/CONTRIBUTORS.rst
-
1report_qweb_pdf_watermark/readme/DESCRIPTION.rst
-
16report_qweb_pdf_watermark/readme/HISTORY.rst
-
4report_qweb_pdf_watermark/readme/INSTALL.rst
-
1report_qweb_pdf_watermark/readme/ROADMAP.rst
-
5report_qweb_pdf_watermark/readme/USAGE.rst
-
BINreport_qweb_pdf_watermark/static/description/icon.png
-
458report_qweb_pdf_watermark/static/description/index.html
-
3report_qweb_pdf_watermark/static/src/css/report_qweb_pdf_watermark.css
-
4report_qweb_pdf_watermark/tests/__init__.py
-
33report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py
-
20report_qweb_pdf_watermark/views/ir_actions_report_xml.xml
-
12report_qweb_pdf_watermark/views/layout_templates.xml
-
1requirements.txt
-
1setup/report_qweb_pdf_watermark/odoo/addons/report_qweb_pdf_watermark
-
6setup/report_qweb_pdf_watermark/setup.py
@ -0,0 +1,117 @@ |
|||||
|
============= |
||||
|
Pdf watermark |
||||
|
============= |
||||
|
|
||||
|
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! 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%2Freporting--engine-lightgray.png?logo=github |
||||
|
:target: https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_pdf_watermark |
||||
|
:alt: OCA/reporting-engine |
||||
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
||||
|
:target: https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_qweb_pdf_watermark |
||||
|
:alt: Translate me on Weblate |
||||
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png |
||||
|
:target: https://runbot.odoo-community.org/runbot/143/12.0 |
||||
|
:alt: Try me on Runbot |
||||
|
|
||||
|
|badge1| |badge2| |badge3| |badge4| |badge5| |
||||
|
|
||||
|
This module was written to add watermarks (backgrounds) to PDF reports. Because of the way wkhtmltopdf handles headers and footers in the current versions, it is quite impossible to have a background for the complete page using HTML and CSS. That is why this module inserts the image at the PDF level. |
||||
|
|
||||
|
**Table of contents** |
||||
|
|
||||
|
.. contents:: |
||||
|
:local: |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
|
||||
|
As PyPDF is not supported in python3, you need to install PyPDF2:: |
||||
|
|
||||
|
$ pip install pypdf2 |
||||
|
|
||||
|
Usage |
||||
|
===== |
||||
|
|
||||
|
To use this module, you need to: |
||||
|
|
||||
|
#. go to your report |
||||
|
#. select a PDF or image to use as watermark. Note that resolutions and size must match, otherwise you'll have funny results |
||||
|
#. You can also fill in an expression that returns the data (base64 encoded) to be used as watermark |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
This module depends on support for transparent backgrounds in Wkhtmltopdf, which has been flaky in the past. This module has been reported to work with Wkhtmltopdf 0.12.4. |
||||
|
|
||||
|
Changelog |
||||
|
========= |
||||
|
|
||||
|
12.0.1.0.0 (2019-11-18) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V12. |
||||
|
|
||||
|
13.0.1.0.0 (2021-01-27) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V13. |
||||
|
|
||||
|
14.0.1.0.0 (2021-01-29) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V14. |
||||
|
|
||||
|
Bug Tracker |
||||
|
=========== |
||||
|
|
||||
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20report_qweb_pdf_watermark%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 |
||||
|
|
||||
|
Contributors |
||||
|
~~~~~~~~~~~~ |
||||
|
|
||||
|
* Holger Brunn <hbrunn@therp.nl> |
||||
|
* Stefan Rijnhart <stefan@opener.am> |
||||
|
* Rod Schouteden <rod.schouteden@dynapps.be> |
||||
|
* Robin Goots <robin.goots@dynapps.be> |
||||
|
* Foram Shah <foram.shah@initos.com> |
||||
|
|
||||
|
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/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_pdf_watermark>`_ project on GitHub. |
||||
|
|
||||
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
@ -0,0 +1,4 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from . import models |
@ -0,0 +1,20 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
{ |
||||
|
"name": "Pdf watermark", |
||||
|
"version": "14.0.1.0.0", |
||||
|
"author": "Therp BV, " "Odoo Community Association (OCA)", |
||||
|
"license": "AGPL-3", |
||||
|
"category": "Technical Settings", |
||||
|
"summary": "Add watermarks to your QWEB PDF reports", |
||||
|
"website": "https://github.com/OCA/reporting-engine", |
||||
|
"depends": ["web"], |
||||
|
"data": [ |
||||
|
"demo/report.xml", |
||||
|
"views/ir_actions_report_xml.xml", |
||||
|
"views/layout_templates.xml", |
||||
|
], |
||||
|
"demo": ["demo/report.xml"], |
||||
|
"installable": True, |
||||
|
"external_dependencies": {"python": ["PyPDF2"]}, |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<data> |
||||
|
<record id="demo_reports" model="ir.actions.report"> |
||||
|
<field name="name">Demo report</field> |
||||
|
<field name="model">res.users</field> |
||||
|
<field name="report_type">qweb-pdf</field> |
||||
|
<field name="report_name">report_qweb_pdf_watermark.demo_report_view</field> |
||||
|
<field name="report_file">report_qweb_pdf_watermark.demo_report_view</field> |
||||
|
<field name="paperformat_id" ref="base.paperformat_euro" /> |
||||
|
<field name="binding_model_id" ref="base.model_res_users" /> |
||||
|
<field name="binding_type">report</field> |
||||
|
</record> |
||||
|
<record id="demo_report" model="ir.actions.report"> |
||||
|
<field name="name">Demo report</field> |
||||
|
<field name="model">res.users</field> |
||||
|
<field name="report_name">report_qweb_pdf_watermark.demo_report_view</field> |
||||
|
<field name="pdf_watermark_expression">docs[:1].company_id.logo</field> |
||||
|
</record> |
||||
|
<template id="demo_report_view"> |
||||
|
<t t-call="web.html_container"> |
||||
|
<t t-call="web.external_layout"> |
||||
|
<div class="page"> |
||||
|
<ul> |
||||
|
<li t-foreach="docs" t-as="doc"> |
||||
|
<t t-esc="doc.name" /> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
</template> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,47 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Carles Antoli <carlesantoli@hotmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Carles Antoli <carlesantoli@hotmail.com>, 2017\n" |
||||
|
"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" |
||||
|
"Language: ca\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Informe" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,47 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Hans Henrik Gabelgaard <hhg@gabelgaard.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Hans Henrik Gabelgaard <hhg@gabelgaard.org>, 2017\n" |
||||
|
"Language-Team: Danish (https://www.transifex.com/oca/teams/23907/da/)\n" |
||||
|
"Language: da\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Rapport" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,54 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
# Rudolf Schnapka <rs@techno-flex.de>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-03-04 05:58+0000\n" |
||||
|
"PO-Revision-Date: 2017-03-04 05:58+0000\n" |
||||
|
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>, 2017\n" |
||||
|
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" |
||||
|
"Language: de\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
"Ein Ausdruck der base64-geschlüsselte Daten, zur Verwendung als " |
||||
|
"Wasserzeichen, liefert.\n" |
||||
|
"Sie haben die Variablen 'env' und 'docs' zur Verfügung" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "Beispielbericht" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Bericht" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "Wasserzeichen" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "Wasserzeichnen-Ausdruck" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Kostas Goutoudis <goutoudis@gmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Kostas Goutoudis <goutoudis@gmail.com>, 2017\n" |
||||
|
"Language-Team: Greek (Greece) (https://www.transifex.com/oca/teams/23907/" |
||||
|
"el_GR/)\n" |
||||
|
"Language: el_GR\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Αναφορά" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,54 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
||||
|
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
"Una expresión que obtenga los datos codificados en base64 a ser usada como " |
||||
|
"marca de agua.\n" |
||||
|
"Tiene acceso a las variables `env` y `docs`." |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "Informe demo" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Informe" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "Marca de agua" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "Expresión para la marca de agua" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# John Toro <johntoro@gmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: John Toro <johntoro@gmail.com>, 2017\n" |
||||
|
"Language-Team: Spanish (Colombia) (https://www.transifex.com/oca/teams/23907/" |
||||
|
"es_CO/)\n" |
||||
|
"Language: es_CO\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Iforme" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,51 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Yannick Vaucher <yannick.vaucher@camptocamp.com>, 2017 |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
||||
|
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" |
||||
|
"Language: fr\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Rapport" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,47 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Alejandro Santana <alejandrosantana@anubia.es>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Alejandro Santana <alejandrosantana@anubia.es>, 2017\n" |
||||
|
"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" |
||||
|
"Language: gl\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Informe" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,50 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Bole <bole@dajmi5.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" |
||||
|
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" |
||||
|
"Language: hr\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
||||
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
msgid "Report Action" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,54 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Bole <bole@dajmi5.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 10.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-07-13 02:42+0000\n" |
||||
|
"PO-Revision-Date: 2017-07-13 02:42+0000\n" |
||||
|
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n" |
||||
|
"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" |
||||
|
"hr_HR/)\n" |
||||
|
"Language: hr_HR\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
||||
|
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
"Izraz koji polučuje base46 kodirane podatke koji se koriste kao vodeni žig.\n" |
||||
|
"Imate pristup varijablama 'env' i 'docs'" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "Demo izvještaj" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Izvještaj" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "Vodeni žig" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "Izraz vodenog žiga" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,51 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Paolo Valier <paolo.valier@hotmail.it>, 2017 |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
||||
|
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Report" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Imre Kristoffer Eilertsen <imreeil42@gmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Imre Kristoffer Eilertsen <imreeil42@gmail.com>, 2017\n" |
||||
|
"Language-Team: Norwegian Bokmål (Norway) (https://www.transifex.com/oca/" |
||||
|
"teams/23907/nb_NO/)\n" |
||||
|
"Language: nb_NO\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Rapport" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,51 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Peter Hageman <hageman.p@gmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 10.0\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-06-23 00:28+0000\n" |
||||
|
"PO-Revision-Date: 2017-06-23 00:28+0000\n" |
||||
|
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n" |
||||
|
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" |
||||
|
"teams/23907/nl_NL/)\n" |
||||
|
"Language: nl_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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Rapport" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
||||
|
"Language-Team: Polish (https://www.transifex.com/oca/teams/23907/pl/)\n" |
||||
|
"Language: pl\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " |
||||
|
"|| n%100>=20) ? 1 : 2);\n" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Raport" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,47 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" |
||||
|
"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" |
||||
|
"Language: 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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Relatório" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Armando Vulcano Junior <vulcano@uol.com.br>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Armando Vulcano Junior <vulcano@uol.com.br>, 2017\n" |
||||
|
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" |
||||
|
"teams/23907/pt_BR/)\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Relatório" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,52 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# OCA Transbot <transbot@odoo-community.org>, 2017 |
||||
|
# Carla Berjano <berjano.carla@gmail.com>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-14 06:07+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-14 06:07+0000\n" |
||||
|
"Last-Translator: Carla Berjano <berjano.carla@gmail.com>, 2017\n" |
||||
|
"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/" |
||||
|
"teams/23907/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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Relatório" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,41 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 12.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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
msgid "Report Action" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>, 2017\n" |
||||
|
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" |
||||
|
"Language: sl\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" |
||||
|
"%100==4 ? 2 : 3);\n" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Poročilo" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,49 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Ahmet Altinisik <aaltinisik@altinkaya.com.tr>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Ahmet Altinisik <aaltinisik@altinkaya.com.tr>, 2017\n" |
||||
|
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n" |
||||
|
"Language: tr\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: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
msgid "Report Action" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
||||
|
|
||||
|
#~ msgid "ir.actions.report" |
||||
|
#~ msgstr "ir.actions.report" |
@ -0,0 +1,48 @@ |
|||||
|
# Translation of Odoo Server. |
||||
|
# This file contains the translation of the following modules: |
||||
|
# * report_qweb_pdf_watermark |
||||
|
# |
||||
|
# Translators: |
||||
|
# Ozge Altinisik <ozge@altinkaya.com.tr>, 2017 |
||||
|
msgid "" |
||||
|
msgstr "" |
||||
|
"Project-Id-Version: Odoo Server 9.0c\n" |
||||
|
"Report-Msgid-Bugs-To: \n" |
||||
|
"POT-Creation-Date: 2017-01-10 03:40+0000\n" |
||||
|
"PO-Revision-Date: 2017-01-10 03:40+0000\n" |
||||
|
"Last-Translator: Ozge Altinisik <ozge@altinkaya.com.tr>, 2017\n" |
||||
|
"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" |
||||
|
"tr_TR/)\n" |
||||
|
"Language: tr_TR\n" |
||||
|
"MIME-Version: 1.0\n" |
||||
|
"Content-Type: text/plain; charset=UTF-8\n" |
||||
|
"Content-Transfer-Encoding: \n" |
||||
|
"Plural-Forms: nplurals=1; plural=0;\n" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,help:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "" |
||||
|
"An expression yielding the base64 encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.actions.report,name:report_qweb_pdf_watermark.demo_report |
||||
|
msgid "Demo report" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report |
||||
|
#, fuzzy |
||||
|
msgid "Report Action" |
||||
|
msgstr "Rapor" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark |
||||
|
msgid "Watermark" |
||||
|
msgstr "" |
||||
|
|
||||
|
#. module: report_qweb_pdf_watermark |
||||
|
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_actions_report__pdf_watermark_expression |
||||
|
msgid "Watermark expression" |
||||
|
msgstr "" |
@ -0,0 +1,4 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from . import report |
@ -0,0 +1,122 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
from base64 import b64decode |
||||
|
from io import BytesIO |
||||
|
from logging import getLogger |
||||
|
|
||||
|
from PIL import Image |
||||
|
|
||||
|
from odoo import api, fields, models |
||||
|
from odoo.tools.safe_eval import safe_eval |
||||
|
|
||||
|
try: |
||||
|
# we need this to be sure PIL has loaded PDF support |
||||
|
from PIL import PdfImagePlugin # noqa: F401 |
||||
|
except ImportError: |
||||
|
pass |
||||
|
|
||||
|
logger = getLogger(__name__) |
||||
|
|
||||
|
try: |
||||
|
from PyPDF2 import PdfFileReader, PdfFileWriter # pylint: disable=W0404 |
||||
|
from PyPDF2.utils import PdfReadError # pylint: disable=W0404 |
||||
|
except ImportError: |
||||
|
logger.debug("Can not import PyPDF2") |
||||
|
|
||||
|
|
||||
|
class Report(models.Model): |
||||
|
_inherit = "ir.actions.report" |
||||
|
|
||||
|
pdf_watermark = fields.Binary("Watermark") |
||||
|
pdf_watermark_expression = fields.Char( |
||||
|
"Watermark expression", |
||||
|
help="An expression yielding the base64 " |
||||
|
"encoded data to be used as watermark. \n" |
||||
|
"You have access to variables `env` and `docs`", |
||||
|
) |
||||
|
|
||||
|
def _render_qweb_pdf(self, res_ids=None, data=None): |
||||
|
if not self.env.context.get("res_ids"): |
||||
|
return super(Report, self.with_context(res_ids=res_ids))._render_qweb_pdf( |
||||
|
res_ids=res_ids, data=data |
||||
|
) |
||||
|
return super(Report, self)._render_qweb_pdf(res_ids=res_ids, data=data) |
||||
|
|
||||
|
@api.model |
||||
|
def _run_wkhtmltopdf( |
||||
|
self, |
||||
|
bodies, |
||||
|
header=None, |
||||
|
footer=None, |
||||
|
landscape=False, |
||||
|
specific_paperformat_args=None, |
||||
|
set_viewport_size=False, |
||||
|
): |
||||
|
result = super(Report, self)._run_wkhtmltopdf( |
||||
|
bodies, |
||||
|
header=header, |
||||
|
footer=footer, |
||||
|
landscape=landscape, |
||||
|
specific_paperformat_args=specific_paperformat_args, |
||||
|
set_viewport_size=set_viewport_size, |
||||
|
) |
||||
|
|
||||
|
docids = self.env.context.get("res_ids", False) |
||||
|
watermark = None |
||||
|
if self.pdf_watermark: |
||||
|
watermark = b64decode(self.pdf_watermark) |
||||
|
elif docids: |
||||
|
watermark = safe_eval( |
||||
|
self.pdf_watermark_expression or "None", |
||||
|
dict(env=self.env, docs=self.env[self.model].browse(docids)), |
||||
|
) |
||||
|
if watermark: |
||||
|
watermark = b64decode(watermark) |
||||
|
|
||||
|
if not watermark: |
||||
|
return result |
||||
|
|
||||
|
pdf = PdfFileWriter() |
||||
|
pdf_watermark = None |
||||
|
try: |
||||
|
pdf_watermark = PdfFileReader(BytesIO(watermark)) |
||||
|
except PdfReadError: |
||||
|
# let's see if we can convert this with pillow |
||||
|
try: |
||||
|
Image.init() |
||||
|
image = Image.open(BytesIO(watermark)) |
||||
|
pdf_buffer = BytesIO() |
||||
|
if image.mode != "RGB": |
||||
|
image = image.convert("RGB") |
||||
|
resolution = image.info.get("dpi", self.paperformat_id.dpi or 90) |
||||
|
if isinstance(resolution, tuple): |
||||
|
resolution = resolution[0] |
||||
|
image.save(pdf_buffer, "pdf", resolution=resolution) |
||||
|
pdf_watermark = PdfFileReader(pdf_buffer) |
||||
|
except Exception as e: |
||||
|
logger.exception("Failed to load watermark", e) |
||||
|
|
||||
|
if not pdf_watermark: |
||||
|
logger.error("No usable watermark found, got %s...", watermark[:100]) |
||||
|
return result |
||||
|
|
||||
|
if pdf_watermark.numPages < 1: |
||||
|
logger.error("Your watermark pdf does not contain any pages") |
||||
|
return result |
||||
|
if pdf_watermark.numPages > 1: |
||||
|
logger.debug( |
||||
|
"Your watermark pdf contains more than one page, " |
||||
|
"all but the first one will be ignored" |
||||
|
) |
||||
|
|
||||
|
for page in PdfFileReader(BytesIO(result)).pages: |
||||
|
watermark_page = pdf.addBlankPage( |
||||
|
page.mediaBox.getWidth(), page.mediaBox.getHeight() |
||||
|
) |
||||
|
watermark_page.mergePage(pdf_watermark.getPage(0)) |
||||
|
watermark_page.mergePage(page) |
||||
|
|
||||
|
pdf_content = BytesIO() |
||||
|
pdf.write(pdf_content) |
||||
|
|
||||
|
return pdf_content.getvalue() |
@ -0,0 +1,5 @@ |
|||||
|
* Holger Brunn <hbrunn@therp.nl> |
||||
|
* Stefan Rijnhart <stefan@opener.am> |
||||
|
* Rod Schouteden <rod.schouteden@dynapps.be> |
||||
|
* Robin Goots <robin.goots@dynapps.be> |
||||
|
* Foram Shah <foram.shah@initos.com> |
@ -0,0 +1 @@ |
|||||
|
This module was written to add watermarks (backgrounds) to PDF reports. Because of the way wkhtmltopdf handles headers and footers in the current versions, it is quite impossible to have a background for the complete page using HTML and CSS. That is why this module inserts the image at the PDF level. |
@ -0,0 +1,16 @@ |
|||||
|
12.0.1.0.0 (2019-11-18) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V12. |
||||
|
|
||||
|
|
||||
|
13.0.1.0.0 (2021-01-27) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V13. |
||||
|
|
||||
|
|
||||
|
14.0.1.0.0 (2021-01-29) |
||||
|
~~~~~~~~~~~~~~~~~~~~~~~ |
||||
|
|
||||
|
* [MIG] Migration to V14. |
@ -0,0 +1,4 @@ |
|||||
|
|
||||
|
As PyPDF is not supported in python3, you need to install PyPDF2:: |
||||
|
|
||||
|
$ pip install pypdf2 |
@ -0,0 +1 @@ |
|||||
|
This module depends on support for transparent backgrounds in Wkhtmltopdf, which has been flaky in the past. This module has been reported to work with Wkhtmltopdf 0.12.4. |
@ -0,0 +1,5 @@ |
|||||
|
To use this module, you need to: |
||||
|
|
||||
|
#. go to your report |
||||
|
#. select a PDF or image to use as watermark. Note that resolutions and size must match, otherwise you'll have funny results |
||||
|
#. You can also fill in an expression that returns the data (base64 encoded) to be used as watermark |
After Width: 128 | Height: 128 | Size: 9.2 KiB |
@ -0,0 +1,458 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
||||
|
<head> |
||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
|
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> |
||||
|
<title>Pdf watermark</title> |
||||
|
<style type="text/css"> |
||||
|
|
||||
|
/* |
||||
|
:Author: David Goodger (goodger@python.org) |
||||
|
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $ |
||||
|
:Copyright: This stylesheet has been placed in the public domain. |
||||
|
|
||||
|
Default cascading style sheet for the HTML output of Docutils. |
||||
|
|
||||
|
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to |
||||
|
customize this style sheet. |
||||
|
*/ |
||||
|
|
||||
|
/* used to remove borders from tables and images */ |
||||
|
.borderless, table.borderless td, table.borderless th { |
||||
|
border: 0 } |
||||
|
|
||||
|
table.borderless td, table.borderless th { |
||||
|
/* Override padding for "table.docutils td" with "! important". |
||||
|
The right padding separates the table cells. */ |
||||
|
padding: 0 0.5em 0 0 ! important } |
||||
|
|
||||
|
.first { |
||||
|
/* Override more specific margin styles with "! important". */ |
||||
|
margin-top: 0 ! important } |
||||
|
|
||||
|
.last, .with-subtitle { |
||||
|
margin-bottom: 0 ! important } |
||||
|
|
||||
|
.hidden { |
||||
|
display: none } |
||||
|
|
||||
|
.subscript { |
||||
|
vertical-align: sub; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
.superscript { |
||||
|
vertical-align: super; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
a.toc-backref { |
||||
|
text-decoration: none ; |
||||
|
color: black } |
||||
|
|
||||
|
blockquote.epigraph { |
||||
|
margin: 2em 5em ; } |
||||
|
|
||||
|
dl.docutils dd { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get bold-faced definition list terms |
||||
|
dl.docutils dt { |
||||
|
font-weight: bold } |
||||
|
*/ |
||||
|
|
||||
|
div.abstract { |
||||
|
margin: 2em 5em } |
||||
|
|
||||
|
div.abstract p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
text-align: center } |
||||
|
|
||||
|
div.admonition, div.attention, div.caution, div.danger, div.error, |
||||
|
div.hint, div.important, div.note, div.tip, div.warning { |
||||
|
margin: 2em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.admonition p.admonition-title, div.hint p.admonition-title, |
||||
|
div.important p.admonition-title, div.note p.admonition-title, |
||||
|
div.tip p.admonition-title { |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
div.attention p.admonition-title, div.caution p.admonition-title, |
||||
|
div.danger p.admonition-title, div.error p.admonition-title, |
||||
|
div.warning p.admonition-title, .code .error { |
||||
|
color: red ; |
||||
|
font-weight: bold ; |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
/* Uncomment (and remove this text!) to get reduced vertical space in |
||||
|
compound paragraphs. |
||||
|
div.compound .compound-first, div.compound .compound-middle { |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
div.compound .compound-last, div.compound .compound-middle { |
||||
|
margin-top: 0.5em } |
||||
|
*/ |
||||
|
|
||||
|
div.dedication { |
||||
|
margin: 2em 5em ; |
||||
|
text-align: center ; |
||||
|
font-style: italic } |
||||
|
|
||||
|
div.dedication p.topic-title { |
||||
|
font-weight: bold ; |
||||
|
font-style: normal } |
||||
|
|
||||
|
div.figure { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
div.footer, div.header { |
||||
|
clear: both; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
div.line-block { |
||||
|
display: block ; |
||||
|
margin-top: 1em ; |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
div.line-block div.line-block { |
||||
|
margin-top: 0 ; |
||||
|
margin-bottom: 0 ; |
||||
|
margin-left: 1.5em } |
||||
|
|
||||
|
div.sidebar { |
||||
|
margin: 0 0 0.5em 1em ; |
||||
|
border: medium outset ; |
||||
|
padding: 1em ; |
||||
|
background-color: #ffffee ; |
||||
|
width: 40% ; |
||||
|
float: right ; |
||||
|
clear: right } |
||||
|
|
||||
|
div.sidebar p.rubric { |
||||
|
font-family: sans-serif ; |
||||
|
font-size: medium } |
||||
|
|
||||
|
div.system-messages { |
||||
|
margin: 5em } |
||||
|
|
||||
|
div.system-messages h1 { |
||||
|
color: red } |
||||
|
|
||||
|
div.system-message { |
||||
|
border: medium outset ; |
||||
|
padding: 1em } |
||||
|
|
||||
|
div.system-message p.system-message-title { |
||||
|
color: red ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
div.topic { |
||||
|
margin: 2em } |
||||
|
|
||||
|
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, |
||||
|
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { |
||||
|
margin-top: 0.4em } |
||||
|
|
||||
|
h1.title { |
||||
|
text-align: center } |
||||
|
|
||||
|
h2.subtitle { |
||||
|
text-align: center } |
||||
|
|
||||
|
hr.docutils { |
||||
|
width: 75% } |
||||
|
|
||||
|
img.align-left, .figure.align-left, object.align-left, table.align-left { |
||||
|
clear: left ; |
||||
|
float: left ; |
||||
|
margin-right: 1em } |
||||
|
|
||||
|
img.align-right, .figure.align-right, object.align-right, table.align-right { |
||||
|
clear: right ; |
||||
|
float: right ; |
||||
|
margin-left: 1em } |
||||
|
|
||||
|
img.align-center, .figure.align-center, object.align-center { |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
table.align-center { |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
|
||||
|
.align-left { |
||||
|
text-align: left } |
||||
|
|
||||
|
.align-center { |
||||
|
clear: both ; |
||||
|
text-align: center } |
||||
|
|
||||
|
.align-right { |
||||
|
text-align: right } |
||||
|
|
||||
|
/* reset inner alignment in figures */ |
||||
|
div.align-right { |
||||
|
text-align: inherit } |
||||
|
|
||||
|
/* div.align-center * { */ |
||||
|
/* text-align: left } */ |
||||
|
|
||||
|
.align-top { |
||||
|
vertical-align: top } |
||||
|
|
||||
|
.align-middle { |
||||
|
vertical-align: middle } |
||||
|
|
||||
|
.align-bottom { |
||||
|
vertical-align: bottom } |
||||
|
|
||||
|
ol.simple, ul.simple { |
||||
|
margin-bottom: 1em } |
||||
|
|
||||
|
ol.arabic { |
||||
|
list-style: decimal } |
||||
|
|
||||
|
ol.loweralpha { |
||||
|
list-style: lower-alpha } |
||||
|
|
||||
|
ol.upperalpha { |
||||
|
list-style: upper-alpha } |
||||
|
|
||||
|
ol.lowerroman { |
||||
|
list-style: lower-roman } |
||||
|
|
||||
|
ol.upperroman { |
||||
|
list-style: upper-roman } |
||||
|
|
||||
|
p.attribution { |
||||
|
text-align: right ; |
||||
|
margin-left: 50% } |
||||
|
|
||||
|
p.caption { |
||||
|
font-style: italic } |
||||
|
|
||||
|
p.credits { |
||||
|
font-style: italic ; |
||||
|
font-size: smaller } |
||||
|
|
||||
|
p.label { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
p.rubric { |
||||
|
font-weight: bold ; |
||||
|
font-size: larger ; |
||||
|
color: maroon ; |
||||
|
text-align: center } |
||||
|
|
||||
|
p.sidebar-title { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold ; |
||||
|
font-size: larger } |
||||
|
|
||||
|
p.sidebar-subtitle { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
p.topic-title { |
||||
|
font-weight: bold } |
||||
|
|
||||
|
pre.address { |
||||
|
margin-bottom: 0 ; |
||||
|
margin-top: 0 ; |
||||
|
font: inherit } |
||||
|
|
||||
|
pre.literal-block, pre.doctest-block, pre.math, pre.code { |
||||
|
margin-left: 2em ; |
||||
|
margin-right: 2em } |
||||
|
|
||||
|
pre.code .ln { color: grey; } /* line numbers */ |
||||
|
pre.code, code { background-color: #eeeeee } |
||||
|
pre.code .comment, code .comment { color: #5C6576 } |
||||
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } |
||||
|
pre.code .literal.string, code .literal.string { color: #0C5404 } |
||||
|
pre.code .name.builtin, code .name.builtin { color: #352B84 } |
||||
|
pre.code .deleted, code .deleted { background-color: #DEB0A1} |
||||
|
pre.code .inserted, code .inserted { background-color: #A3D289} |
||||
|
|
||||
|
span.classifier { |
||||
|
font-family: sans-serif ; |
||||
|
font-style: oblique } |
||||
|
|
||||
|
span.classifier-delimiter { |
||||
|
font-family: sans-serif ; |
||||
|
font-weight: bold } |
||||
|
|
||||
|
span.interpreted { |
||||
|
font-family: sans-serif } |
||||
|
|
||||
|
span.option { |
||||
|
white-space: nowrap } |
||||
|
|
||||
|
span.pre { |
||||
|
white-space: pre } |
||||
|
|
||||
|
span.problematic { |
||||
|
color: red } |
||||
|
|
||||
|
span.section-subtitle { |
||||
|
/* font-size relative to parent (h1..h6 element) */ |
||||
|
font-size: 80% } |
||||
|
|
||||
|
table.citation { |
||||
|
border-left: solid 1px gray; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docinfo { |
||||
|
margin: 2em 4em } |
||||
|
|
||||
|
table.docutils { |
||||
|
margin-top: 0.5em ; |
||||
|
margin-bottom: 0.5em } |
||||
|
|
||||
|
table.footnote { |
||||
|
border-left: solid 1px black; |
||||
|
margin-left: 1px } |
||||
|
|
||||
|
table.docutils td, table.docutils th, |
||||
|
table.docinfo td, table.docinfo th { |
||||
|
padding-left: 0.5em ; |
||||
|
padding-right: 0.5em ; |
||||
|
vertical-align: top } |
||||
|
|
||||
|
table.docutils th.field-name, table.docinfo th.docinfo-name { |
||||
|
font-weight: bold ; |
||||
|
text-align: left ; |
||||
|
white-space: nowrap ; |
||||
|
padding-left: 0 } |
||||
|
|
||||
|
/* "booktabs" style (no vertical lines) */ |
||||
|
table.docutils.booktabs { |
||||
|
border: 0px; |
||||
|
border-top: 2px solid; |
||||
|
border-bottom: 2px solid; |
||||
|
border-collapse: collapse; |
||||
|
} |
||||
|
table.docutils.booktabs * { |
||||
|
border: 0px; |
||||
|
} |
||||
|
table.docutils.booktabs th { |
||||
|
border-bottom: thin solid; |
||||
|
text-align: left; |
||||
|
} |
||||
|
|
||||
|
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, |
||||
|
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { |
||||
|
font-size: 100% } |
||||
|
|
||||
|
ul.auto-toc { |
||||
|
list-style-type: none } |
||||
|
|
||||
|
</style> |
||||
|
</head> |
||||
|
<body> |
||||
|
<div class="document" id="pdf-watermark"> |
||||
|
<h1 class="title">Pdf watermark</h1> |
||||
|
|
||||
|
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
||||
|
!! This file is generated by oca-gen-addon-readme !! |
||||
|
!! changes will be overwritten. !! |
||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> |
||||
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_pdf_watermark"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_qweb_pdf_watermark"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> |
||||
|
<p>This module was written to add watermarks (backgrounds) to PDF reports. Because of the way wkhtmltopdf handles headers and footers in the current versions, it is quite impossible to have a background for the complete page using HTML and CSS. That is why this module inserts the image at the PDF level.</p> |
||||
|
<p><strong>Table of contents</strong></p> |
||||
|
<div class="contents local topic" id="contents"> |
||||
|
<ul class="simple"> |
||||
|
<li><a class="reference internal" href="#installation" id="id2">Installation</a></li> |
||||
|
<li><a class="reference internal" href="#usage" id="id3">Usage</a></li> |
||||
|
<li><a class="reference internal" href="#known-issues-roadmap" id="id4">Known issues / Roadmap</a></li> |
||||
|
<li><a class="reference internal" href="#changelog" id="id5">Changelog</a><ul> |
||||
|
<li><a class="reference internal" href="#id1" id="id6">12.0.1.0.0 (2019-11-18)</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
<li><a class="reference internal" href="#bug-tracker" id="id7">Bug Tracker</a></li> |
||||
|
<li><a class="reference internal" href="#credits" id="id8">Credits</a><ul> |
||||
|
<li><a class="reference internal" href="#authors" id="id9">Authors</a></li> |
||||
|
<li><a class="reference internal" href="#contributors" id="id10">Contributors</a></li> |
||||
|
<li><a class="reference internal" href="#maintainers" id="id11">Maintainers</a></li> |
||||
|
</ul> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="installation"> |
||||
|
<h1><a class="toc-backref" href="#id2">Installation</a></h1> |
||||
|
<p>As PyPDF is not supported in python3, you need to install PyPDF2:</p> |
||||
|
<pre class="literal-block"> |
||||
|
$ pip install pypdf2 |
||||
|
</pre> |
||||
|
</div> |
||||
|
<div class="section" id="usage"> |
||||
|
<h1><a class="toc-backref" href="#id3">Usage</a></h1> |
||||
|
<p>To use this module, you need to:</p> |
||||
|
<ol class="arabic simple"> |
||||
|
<li>go to your report</li> |
||||
|
<li>select a PDF or image to use as watermark. Note that resolutions and size must match, otherwise you’ll have funny results</li> |
||||
|
<li>You can also fill in an expression that returns the data (base64 encoded) to be used as watermark</li> |
||||
|
</ol> |
||||
|
</div> |
||||
|
<div class="section" id="known-issues-roadmap"> |
||||
|
<h1><a class="toc-backref" href="#id4">Known issues / Roadmap</a></h1> |
||||
|
<p>This module depends on support for transparent backgrounds in Wkhtmltopdf, which has been flaky in the past. This module has been reported to work with Wkhtmltopdf 0.12.4.</p> |
||||
|
</div> |
||||
|
<div class="section" id="changelog"> |
||||
|
<h1><a class="toc-backref" href="#id5">Changelog</a></h1> |
||||
|
<div class="section" id="id1"> |
||||
|
<h2><a class="toc-backref" href="#id6">12.0.1.0.0 (2019-11-18)</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>[MIG] Migration to V12.</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="section" id="bug-tracker"> |
||||
|
<h1><a class="toc-backref" href="#id7">Bug Tracker</a></h1> |
||||
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>. |
||||
|
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 |
||||
|
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_pdf_watermark%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> |
||||
|
<p>Do not contact contributors directly about support or help with technical issues.</p> |
||||
|
</div> |
||||
|
<div class="section" id="credits"> |
||||
|
<h1><a class="toc-backref" href="#id8">Credits</a></h1> |
||||
|
<div class="section" id="authors"> |
||||
|
<h2><a class="toc-backref" href="#id9">Authors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Therp BV</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="contributors"> |
||||
|
<h2><a class="toc-backref" href="#id10">Contributors</a></h2> |
||||
|
<ul class="simple"> |
||||
|
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li> |
||||
|
<li>Stefan Rijnhart <<a class="reference external" href="mailto:stefan@opener.am">stefan@opener.am</a>></li> |
||||
|
<li>Rod Schouteden <<a class="reference external" href="mailto:rod.schouteden@dynapps.be">rod.schouteden@dynapps.be</a>></li> |
||||
|
<li>Robin Goots <<a class="reference external" href="mailto:robin.goots@dynapps.be">robin.goots@dynapps.be</a>></li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
<div class="section" id="maintainers"> |
||||
|
<h2><a class="toc-backref" href="#id11">Maintainers</a></h2> |
||||
|
<p>This module is maintained by the OCA.</p> |
||||
|
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> |
||||
|
<p>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.</p> |
||||
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_pdf_watermark">OCA/reporting-engine</a> project on GitHub.</p> |
||||
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,3 @@ |
|||||
|
body { |
||||
|
background: transparent !important; |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
|
||||
|
from . import test_report_qweb_pdf_watermark |
@ -0,0 +1,33 @@ |
|||||
|
# © 2016 Therp BV <http://therp.nl> |
||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
||||
|
from PIL import Image |
||||
|
|
||||
|
from odoo.tests.common import HttpCase |
||||
|
|
||||
|
|
||||
|
class TestReportQwebPdfWatermark(HttpCase): |
||||
|
def test_report_qweb_pdf_watermark(self): |
||||
|
Image.init() |
||||
|
# with our image, we have three |
||||
|
self._test_report_images(3) |
||||
|
|
||||
|
self.env.ref("report_qweb_pdf_watermark.demo_report").write( |
||||
|
{"pdf_watermark_expression": False} |
||||
|
) |
||||
|
# without, we have two |
||||
|
self._test_report_images(2) |
||||
|
|
||||
|
self.env.ref("report_qweb_pdf_watermark.demo_report").write( |
||||
|
{"pdf_watermark": self.env.user.company_id.logo} |
||||
|
) |
||||
|
# and now we should have three again |
||||
|
self._test_report_images(3) |
||||
|
|
||||
|
def _test_report_images(self, number): |
||||
|
report = self.env["ir.model.data"].xmlid_to_object( |
||||
|
"report_qweb_pdf_watermark.demo_report" |
||||
|
) |
||||
|
pdf, _ = report.with_context(force_report_rendering=True)._render_qweb_pdf( |
||||
|
self.env["res.users"].search([]).ids |
||||
|
) |
||||
|
self.assertEqual(pdf.count(b"/Subtype /Image"), number) |
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<record id="act_report_xml_view" model="ir.ui.view"> |
||||
|
<field name="model">ir.actions.report</field> |
||||
|
<field name="inherit_id" ref="base.act_report_xml_view" /> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="attachment" position="after"> |
||||
|
<field |
||||
|
name="pdf_watermark" |
||||
|
attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" |
||||
|
/> |
||||
|
<field |
||||
|
name="pdf_watermark_expression" |
||||
|
attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}" |
||||
|
groups="base.group_no_one" |
||||
|
/> |
||||
|
</field> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,12 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!-- Include fix for https://github.com/odoo/odoo/issues/16610 --> |
||||
|
<template id="assets_pdf" inherit_id="web.report_assets_pdf"> |
||||
|
<link position="after"> |
||||
|
<link |
||||
|
href="/report_qweb_pdf_watermark/static/src/css/report_qweb_pdf_watermark.css" |
||||
|
rel="stylesheet" |
||||
|
/> |
||||
|
</link> |
||||
|
</template> |
||||
|
</odoo> |
@ -1,3 +1,4 @@ |
|||||
# generated from manifests external_dependencies |
# generated from manifests external_dependencies |
||||
|
PyPDF2 |
||||
xlrd |
xlrd |
||||
xlsxwriter |
xlsxwriter |
@ -0,0 +1 @@ |
|||||
|
../../../../report_qweb_pdf_watermark |
@ -0,0 +1,6 @@ |
|||||
|
import setuptools |
||||
|
|
||||
|
setuptools.setup( |
||||
|
setup_requires=['setuptools-odoo'], |
||||
|
odoo_addon=True, |
||||
|
) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue