Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[17.0][MIG] report_qweb_pdf_watermark #841

Open
wants to merge 42 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0e95633
report_qweb_pdf_watermark (#86)
hbrunn Jan 9, 2017
e835161
OCA Transbot updated translations from Transifex
oca-transbot Jan 14, 2017
4141e25
[MIG] report_qweb_pdf_watermark
StefanRijnhart Apr 22, 2017
ab19d7e
[ADD] Prioritize background transparency
StefanRijnhart Apr 24, 2017
e38a65b
OCA Transbot updated translations from Transifex
oca-transbot Jun 3, 2017
af06f38
[FIX] Fix Watermark from PNG
etobella Jun 20, 2017
73f9cb0
OCA Transbot updated translations from Transifex
oca-transbot Jul 1, 2017
df96999
[IMP] use PyPDF2 if possible
hbrunn Jun 8, 2017
929c0e4
[UPD] build environment
hbrunn Jul 18, 2017
352a725
fix test_report_qweb_signer - tests were causing travis to stall
JordiBForgeFlow Sep 14, 2017
2f01de6
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
a26efbf
[FIX] Don't break printing some upstream reports with invalid models
StefanRijnhart Feb 28, 2018
6438c67
[UPD] Update report_qweb_pdf_watermark.pot
oca-travis Jun 23, 2018
0f98e2b
[MIG] report_qweb_pdf_watermark: Migration to 11.0
schout-it Aug 16, 2018
bab254d
[UPD] Update report_qweb_pdf_watermark.pot
oca-travis Mar 15, 2019
3cf2832
Update translation files
oca-transbot Mar 17, 2019
b432824
[MIG] report_qweb_pdf_watermark: Migration to 12.0
robin5210 Nov 18, 2019
15c555c
[UPD] Update report_qweb_pdf_watermark.pot
oca-travis Jan 9, 2020
f0a222c
Update translation files
oca-transbot Jan 23, 2020
76d3c91
Update translation files
oca-transbot Aug 16, 2020
21819d7
[FIX] Fix 'installable' syntax in manifest file
mstuttgart Oct 9, 2020
9d7d59e
report_qweb_pdf_watermark 12.0.1.0.1
OCA-git-bot Oct 13, 2020
b637b10
[13.0][MIG] report_qweb_pdf_watermark
fshah-initos Jan 28, 2021
1cbb374
[IMP] report_qweb_pdf_watermark: black, isort, prettier
fshah-initos Jan 29, 2021
ed0406a
[14.0][MIG] report_qweb_pdf_watermark
fshah-initos Jan 29, 2021
a6707a1
[UPD] Update report_qweb_pdf_watermark.pot
oca-travis Apr 14, 2021
fb12c8a
[UPD] README.rst
OCA-git-bot Apr 14, 2021
21d62e6
[REF] report_qweb_pdf_watermark: remove PyPDF2 from
fernandahf Jun 1, 2022
80a891e
report_qweb_pdf_watermark 14.0.1.0.1
OCA-git-bot Jun 1, 2022
89240a1
[MIG] report_qweb_pdf_watermark: Migration to 15.0
bosd Nov 1, 2022
0042773
[UPD] Update report_qweb_pdf_watermark.pot
Dec 29, 2022
cad82a9
[UPD] README.rst
OCA-git-bot Dec 29, 2022
7fd628a
Update translation files
weblate Dec 29, 2022
4e7610f
[MIG] report_qweb_pdf_watermark: Migration to 16.0
bvanjeelharia Mar 13, 2023
9b3202f
[UPD] Update report_qweb_pdf_watermark.pot
Apr 4, 2023
7968bbd
[UPD] README.rst
OCA-git-bot Apr 4, 2023
044aa2b
Update translation files
weblate Apr 5, 2023
4b81933
[IMP] Avoiding ERROR in log with tests of report_qweb_pdf_watermark
BT-rmartin Aug 25, 2023
3fa18d5
Translated using Weblate (Spanish)
Ivorra78 Aug 23, 2023
8ab367a
[UPD] README.rst
OCA-git-bot Sep 3, 2023
18eb03d
[IMP] report_qweb_pdf_watermark: black, isort, prettier
sanderlienaerts Jan 12, 2024
5c8321a
[MIG] report_qweb_pdf_watermark: Migration to 17.0
sanderlienaerts Jan 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 53 additions & 46 deletions report_qweb_pdf_watermark/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ Pdf watermark
: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/16.0/report_qweb_pdf_watermark
:target: https://github.com/OCA/reporting-engine/tree/17.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-16-0/reporting-engine-16-0-report_qweb_pdf_watermark
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_qweb_pdf_watermark
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0
:alt: Try me on Runboat

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

Expand All @@ -38,103 +42,106 @@ This module was written to add watermarks (backgrounds) to PDF reports. Because
Installation
============

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

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

$ pip 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
1. go to your report
2. select a PDF or image to use as watermark. Note that resolutions and
size must match, otherwise you'll have funny results
3. You can also fill in an expression that returns the data (base64
encoded) to be used as watermark

To use the Company watermark, you need to:

#. go to settings --> company --> update info
#. upload an pdf watermark
#. go to settings --> technical --> reporting --> reports
#. Select the report where you want to use it.
#. On the 'Advanced Properties' tab of the notebook check 'use company watermark'
1. go to settings --> company --> update info
2. upload an pdf watermark
3. go to settings --> technical --> reporting --> reports
4. Select the report where you want to use it.
5. On the 'Advanced Properties' tab of the notebook check 'use company
watermark'

### Demo
And demo report is available (if you have demo data installed) on the users form view.
### Demo And demo report is available (if you have demo data installed)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this

on the users form view.

#. go to Configuration --> users
#. Select an users
#. Click the print button --> Watermark Demo report.
1. go to Configuration --> users
2. Select an users
3. Click the print button --> Watermark Demo report.

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

- [MIG] Migration to V12.

13.0.1.0.0 (2021-01-27)
~~~~~~~~~~~~~~~~~~~~~~~

* [MIG] Migration to V13.
-----------------------

- [MIG] Migration to V13.

14.0.1.0.0 (2021-01-29)
~~~~~~~~~~~~~~~~~~~~~~~

* [MIG] Migration to V14.
-----------------------

- [MIG] Migration to V14.

15.0.1.0.0 (2022-01-11)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

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

16.0.1.0.0 (2023-03-13)
~~~~~~~~~~~~~~~~~~~~~~~
-----------------------

* [MIG] Migration to V16.
- [MIG] Migration to V16.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_pdf_watermark%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_pdf_watermark%0Aversion:%2017.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 <[email protected]>
* Stefan Rijnhart <[email protected]>
* Rod Schouteden <[email protected]>
* Robin Goots <[email protected]>
* Foram Shah <[email protected]>
* Emiel van Bokhoven <[email protected]>
* Anjeel Haria
- Holger Brunn <[email protected]>
- Stefan Rijnhart <[email protected]>
- Rod Schouteden <[email protected]>
- Robin Goots <[email protected]>
- Foram Shah <[email protected]>
- Emiel van Bokhoven <[email protected]>
- Anjeel Haria

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -146,6 +153,6 @@ 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/16.0/report_qweb_pdf_watermark>`_ project on GitHub.
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/report_qweb_pdf_watermark>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions report_qweb_pdf_watermark/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
7 changes: 7 additions & 0 deletions report_qweb_pdf_watermark/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- Holger Brunn \<<[email protected]>\>
- Stefan Rijnhart \<<[email protected]>\>
- Rod Schouteden \<<[email protected]>\>
- Robin Goots \<<[email protected]>\>
- Foram Shah \<<[email protected]>\>
- Emiel van Bokhoven \<<[email protected]>\>
- Anjeel Haria
7 changes: 0 additions & 7 deletions report_qweb_pdf_watermark/readme/CONTRIBUTORS.rst

This file was deleted.

5 changes: 5 additions & 0 deletions report_qweb_pdf_watermark/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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.
1 change: 0 additions & 1 deletion report_qweb_pdf_watermark/readme/DESCRIPTION.rst

This file was deleted.

20 changes: 20 additions & 0 deletions report_qweb_pdf_watermark/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 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.

## 15.0.1.0.0 (2022-01-11)

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

## 16.0.1.0.0 (2023-03-13)

- \[MIG\] Migration to V16.
28 changes: 0 additions & 28 deletions report_qweb_pdf_watermark/readme/HISTORY.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
As PyPDF is not supported in python3, you need to install PyPDF2:

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

$ pip install pypdf2
$ pip install pypdf2
3 changes: 3 additions & 0 deletions report_qweb_pdf_watermark/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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.
1 change: 0 additions & 1 deletion report_qweb_pdf_watermark/readme/ROADMAP.rst

This file was deleted.

23 changes: 23 additions & 0 deletions report_qweb_pdf_watermark/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
To use this module, you need to:

1. go to your report
2. select a PDF or image to use as watermark. Note that resolutions and
size must match, otherwise you'll have funny results
3. You can also fill in an expression that returns the data (base64
encoded) to be used as watermark

To use the Company watermark, you need to:

1. go to settings --\> company --\> update info
2. upload an pdf watermark
3. go to settings --\> technical --\> reporting --\> reports
4. Select the report where you want to use it.
5. On the 'Advanced Properties' tab of the notebook check 'use company
watermark'

\### Demo And demo report is available (if you have demo data installed)
on the users form view.

1. go to Configuration --\> users
2. Select an users
3. Click the print button --\> Watermark Demo report.
20 changes: 0 additions & 20 deletions report_qweb_pdf_watermark/readme/USAGE.rst

This file was deleted.

29 changes: 19 additions & 10 deletions report_qweb_pdf_watermark/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,12 @@ <h1 class="title">Pdf watermark</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2940fdc81ee124d4fef7eef00d6394463dddb5177a4996e6c5ffcb6a19b5734e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/reporting-engine/tree/16.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 image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-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><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" 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 image-reference" href="https://github.com/OCA/reporting-engine/tree/17.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 image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-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 image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-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">
Expand Down Expand Up @@ -406,19 +410,22 @@ <h1><a class="toc-backref" href="#toc-entry-2">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>
<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>
<p>To use the Company watermark, you need to:</p>
<ol class="arabic simple">
<li>go to settings –&gt; company –&gt; update info</li>
<li>upload an pdf watermark</li>
<li>go to settings –&gt; technical –&gt; reporting –&gt; reports</li>
<li>Select the report where you want to use it.</li>
<li>On the ‘Advanced Properties’ tab of the notebook check ‘use company watermark’</li>
<li>On the ‘Advanced Properties’ tab of the notebook check ‘use company
watermark’</li>
</ol>
<p>### Demo
And demo report is available (if you have demo data installed) on the users form view.</p>
<p>### Demo And demo report is available (if you have demo data installed)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check this

on the users form view.</p>
<ol class="arabic simple">
<li>go to Configuration –&gt; users</li>
<li>Select an users</li>
Expand All @@ -427,7 +434,9 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-3">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>
<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="#toc-entry-4">Changelog</a></h1>
Expand Down Expand Up @@ -468,7 +477,7 @@ <h1><a class="toc-backref" href="#toc-entry-10">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 to smash 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:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_pdf_watermark%0Aversion:%2017.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">
Expand Down Expand Up @@ -498,7 +507,7 @@ <h2><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h2>
<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/16.0/report_qweb_pdf_watermark">OCA/reporting-engine</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/17.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>
Expand Down