mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_qweb_pdf_watermark: Migration to 17.0
This commit is contained in:
@@ -111,6 +111,11 @@ Changelog
|
||||
|
||||
- [MIG] Migration to V16.
|
||||
|
||||
17.0.1.0.0 (2024-01-12)
|
||||
-----------------------
|
||||
|
||||
- [MIG] Migration to V17.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
@@ -138,6 +143,7 @@ Contributors
|
||||
- Robin Goots <robin.goots@dynapps.be>
|
||||
- Foram Shah <foram.shah@initos.com>
|
||||
- Emiel van Bokhoven <emiel@360erp.nl>
|
||||
- Sander Lienaerts <sander.lienaerts@codeforward.nl>
|
||||
- Anjeel Haria
|
||||
|
||||
Maintainers
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "Pdf watermark",
|
||||
"version": "16.0.1.0.0",
|
||||
"version": "17.0.1.0.0",
|
||||
"author": "Therp BV, " "Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"category": "Technical Settings",
|
||||
@@ -11,7 +11,6 @@
|
||||
"website": "https://github.com/OCA/reporting-engine",
|
||||
"depends": ["web"],
|
||||
"data": [
|
||||
"demo/report.xml",
|
||||
"views/ir_actions_report_xml.xml",
|
||||
"views/res_company.xml",
|
||||
],
|
||||
|
||||
@@ -44,14 +44,15 @@ class Report(models.Model):
|
||||
|
||||
def _render_qweb_pdf(self, report_ref, 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(
|
||||
report_ref, res_ids=res_ids, data=data
|
||||
return (
|
||||
super()
|
||||
.with_context(res_ids=res_ids)
|
||||
._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)
|
||||
)
|
||||
return super(Report, self)._render_qweb_pdf(
|
||||
report_ref, res_ids=res_ids, data=data
|
||||
)
|
||||
return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)
|
||||
|
||||
def pdf_has_usable_pages(self, numpages):
|
||||
@staticmethod
|
||||
def pdf_has_usable_pages(numpages):
|
||||
if numpages < 1:
|
||||
logger.error("Your watermark pdf does not contain any pages")
|
||||
return False
|
||||
@@ -73,7 +74,7 @@ class Report(models.Model):
|
||||
specific_paperformat_args=None,
|
||||
set_viewport_size=False,
|
||||
):
|
||||
result = super(Report, self)._run_wkhtmltopdf(
|
||||
result = super()._run_wkhtmltopdf(
|
||||
bodies,
|
||||
report_ref=report_ref,
|
||||
header=header,
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
- Robin Goots \<<robin.goots@dynapps.be>\>
|
||||
- Foram Shah \<<foram.shah@initos.com>\>
|
||||
- Emiel van Bokhoven \<<emiel@360erp.nl>\>
|
||||
- Sander Lienaerts \<<sander.lienaerts@codeforward.nl>\>
|
||||
- Anjeel Haria
|
||||
|
||||
@@ -18,3 +18,7 @@
|
||||
## 16.0.1.0.0 (2023-03-13)
|
||||
|
||||
- \[MIG\] Migration to V16.
|
||||
|
||||
## 17.0.1.0.0 (2024-01-12)
|
||||
|
||||
- \[MIG\] Migration to V17.
|
||||
|
||||
@@ -387,13 +387,14 @@ image at the PDF level.</p>
|
||||
<li><a class="reference internal" href="#section-3" id="toc-entry-7">14.0.1.0.0 (2021-01-29)</a></li>
|
||||
<li><a class="reference internal" href="#section-4" id="toc-entry-8">15.0.1.0.0 (2022-01-11)</a></li>
|
||||
<li><a class="reference internal" href="#section-5" id="toc-entry-9">16.0.1.0.0 (2023-03-13)</a></li>
|
||||
<li><a class="reference internal" href="#section-6" id="toc-entry-10">17.0.1.0.0 (2024-01-12)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-10">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-11">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-12">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-13">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-14">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-11">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-12">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-13">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-14">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-15">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -471,9 +472,15 @@ reported to work with Wkhtmltopdf 0.12.4.</p>
|
||||
<li>[MIG] Migration to V16.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="section-6">
|
||||
<h2><a class="toc-backref" href="#toc-entry-10">17.0.1.0.0 (2024-01-12)</a></h2>
|
||||
<ul class="simple">
|
||||
<li>[MIG] Migration to V17.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-10">Bug Tracker</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-11">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
|
||||
@@ -481,15 +488,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<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="#toc-entry-11">Credits</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-12">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-12">Authors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-13">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Therp BV</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-13">Contributors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-14">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Holger Brunn <<a class="reference external" href="mailto:hbrunn@therp.nl">hbrunn@therp.nl</a>></li>
|
||||
<li>Stefan Rijnhart <<a class="reference external" href="mailto:stefan@opener.am">stefan@opener.am</a>></li>
|
||||
@@ -497,11 +504,12 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<li>Robin Goots <<a class="reference external" href="mailto:robin.goots@dynapps.be">robin.goots@dynapps.be</a>></li>
|
||||
<li>Foram Shah <<a class="reference external" href="mailto:foram.shah@initos.com">foram.shah@initos.com</a>></li>
|
||||
<li>Emiel van Bokhoven <<a class="reference external" href="mailto:emiel@360erp.nl">emiel@360erp.nl</a>></li>
|
||||
<li>Sander Lienaerts <<a class="reference external" href="mailto:sander.lienaerts@codeforward.nl">sander.lienaerts@codeforward.nl</a>></li>
|
||||
<li>Anjeel Haria</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-15">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
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
<field name="attachment" position="after">
|
||||
<field
|
||||
name="use_company_watermark"
|
||||
attrs="{'invisible': [('report_type', '!=', 'qweb-pdf')]}"
|
||||
invisible="report_type != 'qweb-pdf'"
|
||||
/>
|
||||
<field
|
||||
name="pdf_watermark_expression"
|
||||
attrs="{'invisible': ['|',('report_type', '!=', 'qweb-pdf'),('use_company_watermark', '=', True)]}"
|
||||
invisible="report_type != 'qweb-pdf' or use_company_watermark"
|
||||
groups="base.group_no_one"
|
||||
/>
|
||||
<field
|
||||
name="pdf_watermark"
|
||||
attrs="{'invisible': ['|',('report_type', '!=', 'qweb-pdf'),('use_company_watermark', '=', True)]}"
|
||||
invisible="report_type != 'qweb-pdf' or use_company_watermark"
|
||||
widget="pdf_viewer"
|
||||
/>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user