Hello everyone,
In Odoo v 11.0, I'd like to print pdf watermark like the module report_qweb_pdf_watermark (odoo 10.0) , so I override the report_qweb_pdf() method this is a part of the code:
res = super(IrActionsReport, self).render_qweb_pdf(docids, data=data)
....................................................................for page in PdfFileReader(BytesIO(res)).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)
Then When I try to print the report I get this error:
for page in PdfFileReader(BytesIO(res)).pages: TypeError: a bytes-like object is required, not 'tuple'
Can youl help me to solve this isuue?