diff --git a/report_qweb_pdf_watermark/README.rst b/report_qweb_pdf_watermark/README.rst index bf1ebee901..15df26ffb4 100644 --- a/report_qweb_pdf_watermark/README.rst +++ b/report_qweb_pdf_watermark/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ============= Pdf watermark ============= @@ -17,7 +13,7 @@ Pdf watermark .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status :alt: Production/Stable -.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png +.. |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 @@ -154,6 +150,7 @@ Contributors - bosd - Sander Lienaerts - Anjeel Haria +- Dennis Sluijk Maintainers ----------- diff --git a/report_qweb_pdf_watermark/__init__.py b/report_qweb_pdf_watermark/__init__.py index 5c170507d8..81fd194b50 100644 --- a/report_qweb_pdf_watermark/__init__.py +++ b/report_qweb_pdf_watermark/__init__.py @@ -2,3 +2,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models +from . import wizards diff --git a/report_qweb_pdf_watermark/__manifest__.py b/report_qweb_pdf_watermark/__manifest__.py index 0dc31ce734..d0e49dc100 100644 --- a/report_qweb_pdf_watermark/__manifest__.py +++ b/report_qweb_pdf_watermark/__manifest__.py @@ -14,6 +14,7 @@ "data": [ "views/ir_actions_report_xml.xml", "views/res_company.xml", + "wizards/base_document_layout.xml", ], "assets": { "web.report_assets_pdf": [ diff --git a/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md b/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md index 9703acc184..a7fed4611a 100644 --- a/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md +++ b/report_qweb_pdf_watermark/readme/CONTRIBUTORS.md @@ -6,3 +6,4 @@ - bosd \<\> - Sander Lienaerts \<\> - Anjeel Haria +- Dennis Sluijk \<\> diff --git a/report_qweb_pdf_watermark/static/description/index.html b/report_qweb_pdf_watermark/static/description/index.html index 0f66dde564..92d7856fae 100644 --- a/report_qweb_pdf_watermark/static/description/index.html +++ b/report_qweb_pdf_watermark/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Pdf watermark -
+
+

Pdf watermark

- - -Odoo Community Association - -
-

Pdf watermark

-

Production/Stable License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

+

Production/Stable License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runboat

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 @@ -406,14 +401,14 @@

Pdf watermark

-

Installation

+

Installation

As PyPDF is not supported in python3, you need to install PyPDF2:

 $ pip install pypdf2
 
-

Usage

+

Usage

To use this module, you need to:

  1. go to your report
  2. @@ -440,59 +435,59 @@

    Usage

-

Known issues / Roadmap

+

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

-

Changelog

+

Changelog

-

15.0.1.0.0 (2022-01-11)

+

15.0.1.0.0 (2022-01-11)

  • [MIG] Migration to V15.
  • Define pdf watermark in company settings
-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -500,15 +495,15 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Therp BV
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -536,6 +532,5 @@

Maintainers

-
diff --git a/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml b/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml index 5b9cdd3c39..3867c1be48 100644 --- a/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml +++ b/report_qweb_pdf_watermark/views/ir_actions_report_xml.xml @@ -22,4 +22,8 @@ + + + + diff --git a/report_qweb_pdf_watermark/wizards/__init__.py b/report_qweb_pdf_watermark/wizards/__init__.py new file mode 100644 index 0000000000..3759403181 --- /dev/null +++ b/report_qweb_pdf_watermark/wizards/__init__.py @@ -0,0 +1 @@ +from . import base_document_layout diff --git a/report_qweb_pdf_watermark/wizards/base_document_layout.py b/report_qweb_pdf_watermark/wizards/base_document_layout.py new file mode 100644 index 0000000000..70d678a5dd --- /dev/null +++ b/report_qweb_pdf_watermark/wizards/base_document_layout.py @@ -0,0 +1,9 @@ +from odoo import fields, models + + +class BaseDocumentLayout(models.TransientModel): + _inherit = "base.document.layout" + + pdf_watermark = fields.Binary( + "Watermark", related="company_id.pdf_watermark", readonly=False + ) diff --git a/report_qweb_pdf_watermark/wizards/base_document_layout.xml b/report_qweb_pdf_watermark/wizards/base_document_layout.xml new file mode 100644 index 0000000000..861d53b3c4 --- /dev/null +++ b/report_qweb_pdf_watermark/wizards/base_document_layout.xml @@ -0,0 +1,21 @@ + + + + base.document.layout + + + + + + + + +