Repository navigation
[20.0][MIG] report_qweb_pdf_watermark: Migration to 20.0 - #1207
Open
BhaveshHeliconia wants to merge 35 commits into
Open
BhaveshHeliconia wants to merge 35 commits into
BhaveshHeliconia wants to merge 35 commits into
Conversation
Member
|
/ocabot migration report_qweb_pdf_watermark |
3 of 22 tasks
BhaveshHeliconia
force-pushed
the
20.0-mig-report_qweb_pdf_watermark
branch
from
October 5, 2026 10:48
3e1f73d to
2e1eb11
Compare
Member
|
Can you have a look at the tests? |
BhaveshHeliconia
force-pushed
the
20.0-mig-report_qweb_pdf_watermark
branch
from
November 30, 2026 07:22
2e1eb11 to
385b012
Compare
|
The following commit authors need to sign the Contributor License Agreement: |
Author
The tests are green now. Thanks! |
StefanRijnhart
left a comment
Member
There was a problem hiding this comment.
Oh, when you did the migration, the 19.0 migration was not merged yet but it is now. Can you rebuild the branch on current 19.0?
When no background configuration is present on the report definition, don't try to browse the report model especially because this breaks some upstream reports (see odoo/odoo#23389)
external_dependencies
[MIG] report_qweb_pdf_watermark: Migration to 15.0
When printing a document in a multi-company environment, the company watermark was selected based on self.env.company (the company currently active in the UI switcher) rather than the company of the document being printed. This caused the wrong watermark to appear when a user switched to company B and printed an invoice belonging to company A (or vice versa), as reported in OCA#1134. Fix by introducing a _get_watermark_company() helper that returns the document's company_id when available, falling back to self.env.company otherwise.
The module only tried to import PyPDF2, so on hosts that ship pypdf (Odoo 19 on Python >= 3.13) PdfReader/PdfWriter stayed undefined and rendering a watermarked report crashed with a NameError. Import the PDF classes from odoo.tools.pdf instead, which picks PyPDF2 2.x, pypdf or PyPDF2 1.x and keeps the legacy method names used here. Drop the obsolete INSTALL instructions to pip install PyPDF2. Addresses OCA#1091 (review) Co-authored-by: DjodyKort <90830682+DjodyKort@users.noreply.github.com>
…pany Resolve the watermark company like core does: use the documents' company_id, then company_ids, and fall back to the environment company. Documents of models that only have company_ids now get their own company's watermark, and the first document that carries a company is used rather than only the first document. Add tests for the company resolution.
Currently translated at 20.0% (2 of 10 strings) Translation: reporting-engine-19.0/reporting-engine-19.0-report_qweb_pdf_watermark Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_qweb_pdf_watermark/pl/
BhaveshHeliconia
force-pushed
the
20.0-mig-report_qweb_pdf_watermark
branch
from
November 30, 2026 10:20
385b012 to
f25a641
Compare
Author
|
@StefanRijnhart Thanks for the review! I've rerun the migration process from 19.0 to 20.0 and addressed your comments. |
BhaveshHeliconia
force-pushed
the
20.0-mig-report_qweb_pdf_watermark
branch
from
December 1, 2026 06:15
f25a641 to
86cc30b
Compare
StefanRijnhart
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.