I'm using Odoo17 and I want to print PDF Report from Wizard. The Wizard works fine, when I click on the button that trigger the function to print the PDF it download a blank PDF. To keep things simple, I'm not gonna publish all the code. So basically here are my files :
wizard/wizard_model
class ModelWizard (models.TransientModel):
_name = 'project.pdf.report'
_description='display printed informations'
info= fields.Char()
def print_report(self):
print(self.env.context)
data = {
'model_id': self.id,
'form': self.env.context
}
return self.env.ref('my_addon.action_report_Pdf').report_action(None, data=data)
Then I got my action file :
report/ir_actions_report
My PDF
project.pdf.report
qweb-pdf
my_addon.my_pdf
my_addon.my_pdf
'Name
report
And finally my template:
Sample Report
I must have missed something. When the PDF is download the file got name instead of . And page is blank, no header nor footer.
Could you help please ?
Thanks!!

