Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
104 Vues

Hello,


I know how to create a pdf report from a template and a "ir.actions.report" record, using q-web possibilities.

I would like to create a such pdf report but from a button.

I suppose that I need to change something in my "ir.actions.report"record

Thnaks in advance,


Boris

Avatar
Ignorer
Auteur

Thank. It's working well.

In fact, I have treatments. I create a new model linked to all treatments with one form view containing only a button: "Report for all treatmemts", beause I want one report for all treatments.

Thanks,

Boris

Meilleure réponse

Hi,


Yes, you can absolutely trigger a PDF report from a button. You just need to define the ir.actions.report as usual, and then call it from your Python method using report_action.


Here's a helpful blog that walks through the process in Odoo 18:


https://www.cybrosys.com/blog/how-to-create-a-pdf-report-in-odoo-18


Hope it helps

Avatar
Ignorer