Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
263 มุมมอง

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

อวตาร
ละทิ้ง
ผู้เขียน

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

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง