Browse Source

Merge PR #346 into 12.0

Signed-off-by hbrunn
12.0
OCA-git-bot 4 years ago
parent
commit
b9ae2d414d
  1. 106
      report_qweb_pdf_watermark/README.rst
  2. 4
      report_qweb_pdf_watermark/__init__.py
  3. 29
      report_qweb_pdf_watermark/__manifest__.py
  4. 28
      report_qweb_pdf_watermark/demo/report.xml
  5. 49
      report_qweb_pdf_watermark/i18n/ca.po
  6. 49
      report_qweb_pdf_watermark/i18n/da.po
  7. 53
      report_qweb_pdf_watermark/i18n/de.po
  8. 50
      report_qweb_pdf_watermark/i18n/el_GR.po
  9. 53
      report_qweb_pdf_watermark/i18n/es.po
  10. 50
      report_qweb_pdf_watermark/i18n/es_CO.po
  11. 50
      report_qweb_pdf_watermark/i18n/fr.po
  12. 49
      report_qweb_pdf_watermark/i18n/gl.po
  13. 47
      report_qweb_pdf_watermark/i18n/hr.po
  14. 53
      report_qweb_pdf_watermark/i18n/hr_HR.po
  15. 50
      report_qweb_pdf_watermark/i18n/it.po
  16. 50
      report_qweb_pdf_watermark/i18n/nb_NO.po
  17. 50
      report_qweb_pdf_watermark/i18n/nl_NL.po
  18. 50
      report_qweb_pdf_watermark/i18n/pl.po
  19. 49
      report_qweb_pdf_watermark/i18n/pt.po
  20. 50
      report_qweb_pdf_watermark/i18n/pt_BR.po
  21. 51
      report_qweb_pdf_watermark/i18n/pt_PT.po
  22. 41
      report_qweb_pdf_watermark/i18n/report_qweb_pdf_watermark.pot
  23. 50
      report_qweb_pdf_watermark/i18n/sl.po
  24. 46
      report_qweb_pdf_watermark/i18n/tr.po
  25. 50
      report_qweb_pdf_watermark/i18n/tr_TR.po
  26. 3
      report_qweb_pdf_watermark/models/__init__.py
  27. 110
      report_qweb_pdf_watermark/models/report.py
  28. 4
      report_qweb_pdf_watermark/readme/CONTRIBUTORS.rst
  29. 1
      report_qweb_pdf_watermark/readme/DESCRIPTION.rst
  30. 4
      report_qweb_pdf_watermark/readme/HISTORY.rst
  31. 4
      report_qweb_pdf_watermark/readme/INSTALL.rst
  32. 1
      report_qweb_pdf_watermark/readme/ROADMAP.rst
  33. 5
      report_qweb_pdf_watermark/readme/USAGE.rst
  34. BIN
      report_qweb_pdf_watermark/static/description/icon.png
  35. 458
      report_qweb_pdf_watermark/static/description/index.html
  36. 3
      report_qweb_pdf_watermark/static/src/css/report_qweb_pdf_watermark.css
  37. 3
      report_qweb_pdf_watermark/tests/__init__.py
  38. 32
      report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py
  39. 13
      report_qweb_pdf_watermark/views/ir_actions_report_xml.xml
  40. 10
      report_qweb_pdf_watermark/views/layout_templates.xml

106
report_qweb_pdf_watermark/README.rst

@ -0,0 +1,106 @@
=============
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.
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>
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.

4
report_qweb_pdf_watermark/__init__.py

@ -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

29
report_qweb_pdf_watermark/__manifest__.py

@ -0,0 +1,29 @@
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Pdf watermark",
"version": "12.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"
],
"intallable": True,
'external_dependencies': {
'python': [
'PyPDF2',
],
},
}

28
report_qweb_pdf_watermark/demo/report.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<report
id="demo_report"
string="Demo report"
model="res.users"
report_type="qweb-pdf"
name="report_qweb_pdf_watermark.demo_report_view"
file="report_qweb_pdf_watermark.demo_report_view"
paperformat="base.paperformat_euro"
/>
<record id="demo_report" model="ir.actions.report">
<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>
</odoo>

49
report_qweb_pdf_watermark/i18n/ca.po

@ -0,0 +1,49 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Informe"

49
report_qweb_pdf_watermark/i18n/da.po

@ -0,0 +1,49 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Rapport"

53
report_qweb_pdf_watermark/i18n/de.po

@ -0,0 +1,53 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr "Wasserzeichen"
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr "Wasserzeichnen-Ausdruck"
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Bericht"

50
report_qweb_pdf_watermark/i18n/el_GR.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Αναφορά"

53
report_qweb_pdf_watermark/i18n/es.po

@ -0,0 +1,53 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_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_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr "Expresión para la marca de agua"
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Informe"

50
report_qweb_pdf_watermark/i18n/es_CO.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Iforme"

50
report_qweb_pdf_watermark/i18n/fr.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Rapport"

49
report_qweb_pdf_watermark/i18n/gl.po

@ -0,0 +1,49 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Informe"

47
report_qweb_pdf_watermark/i18n/hr.po

@ -0,0 +1,47 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"

53
report_qweb_pdf_watermark/i18n/hr_HR.po

@ -0,0 +1,53 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr "Vodeni žig"
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr "Izraz vodenog žiga"
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Izvještaj"

50
report_qweb_pdf_watermark/i18n/it.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Report"

50
report_qweb_pdf_watermark/i18n/nb_NO.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Rapport"

50
report_qweb_pdf_watermark/i18n/nl_NL.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Rapport"

50
report_qweb_pdf_watermark/i18n/pl.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Raport"

49
report_qweb_pdf_watermark/i18n/pt.po

@ -0,0 +1,49 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Relatório"

50
report_qweb_pdf_watermark/i18n/pt_BR.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Relatório"

51
report_qweb_pdf_watermark/i18n/pt_PT.po

@ -0,0 +1,51 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"
#~ msgid "Report"
#~ msgstr "Relatório"

41
report_qweb_pdf_watermark/i18n/report_qweb_pdf_watermark.pot

@ -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 11.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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""

50
report_qweb_pdf_watermark/i18n/sl.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Poročilo"

46
report_qweb_pdf_watermark/i18n/tr.po

@ -0,0 +1,46 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr "ir.actions.report"

50
report_qweb_pdf_watermark/i18n/tr_TR.po

@ -0,0 +1,50 @@
# 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_act_report_xml_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.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark
msgid "Watermark"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model.fields,field_description:report_qweb_pdf_watermark.field_ir_act_report_xml_pdf_watermark_expression
msgid "Watermark expression"
msgstr ""
#. module: report_qweb_pdf_watermark
#: model:ir.model,name:report_qweb_pdf_watermark.model_ir_actions_report
msgid "ir.actions.report"
msgstr ""
#~ msgid "Report"
#~ msgstr "Rapor"

3
report_qweb_pdf_watermark/models/__init__.py

@ -0,0 +1,3 @@
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import report

110
report_qweb_pdf_watermark/models/report.py

@ -0,0 +1,110 @@
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from base64 import b64decode
from logging import getLogger
from PIL import Image
from io import BytesIO
try:
# we need this to be sure PIL has loaded PDF support
from PIL import PdfImagePlugin # noqa: F401
except ImportError:
pass
from odoo import api, models, fields, tools
logger = getLogger(__name__)
try:
from PyPDF2 import PdfFileWriter, PdfFileReader # 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`')
@api.multi
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 = tools.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:
logger.exception('Failed to load watermark')
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()

4
report_qweb_pdf_watermark/readme/CONTRIBUTORS.rst

@ -0,0 +1,4 @@
* Holger Brunn <hbrunn@therp.nl>
* Stefan Rijnhart <stefan@opener.am>
* Rod Schouteden <rod.schouteden@dynapps.be>
* Robin Goots <robin.goots@dynapps.be>

1
report_qweb_pdf_watermark/readme/DESCRIPTION.rst

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

4
report_qweb_pdf_watermark/readme/HISTORY.rst

@ -0,0 +1,4 @@
12.0.1.0.0 (2019-11-18)
~~~~~~~~~~~~~~~~~~~~~~~
* [MIG] Migration to V12.

4
report_qweb_pdf_watermark/readme/INSTALL.rst

@ -0,0 +1,4 @@
As PyPDF is not supported in python3, you need to install PyPDF2::
$ pip install pypdf2

1
report_qweb_pdf_watermark/readme/ROADMAP.rst

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

5
report_qweb_pdf_watermark/readme/USAGE.rst

@ -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

BIN
report_qweb_pdf_watermark/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

458
report_qweb_pdf_watermark/static/description/index.html

@ -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 &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li>
<li>Stefan Rijnhart &lt;<a class="reference external" href="mailto:stefan&#64;opener.am">stefan&#64;opener.am</a>&gt;</li>
<li>Rod Schouteden &lt;<a class="reference external" href="mailto:rod.schouteden&#64;dynapps.be">rod.schouteden&#64;dynapps.be</a>&gt;</li>
<li>Robin Goots &lt;<a class="reference external" href="mailto:robin.goots&#64;dynapps.be">robin.goots&#64;dynapps.be</a>&gt;</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>

3
report_qweb_pdf_watermark/static/src/css/report_qweb_pdf_watermark.css

@ -0,0 +1,3 @@
body {
background: transparent !important;
}

3
report_qweb_pdf_watermark/tests/__init__.py

@ -0,0 +1,3 @@
# © 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

32
report_qweb_pdf_watermark/tests/test_report_qweb_pdf_watermark.py

@ -0,0 +1,32 @@
# © 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)

13
report_qweb_pdf_watermark/views/ir_actions_report_xml.xml

@ -0,0 +1,13 @@
<?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>

10
report_qweb_pdf_watermark/views/layout_templates.xml

@ -0,0 +1,10 @@
<?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>
Loading…
Cancel
Save