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

Hi All,

Do you have any idea to call custom report using button on odoo 11. i have 4 custom sales report layouts and  need  to call that reports from buttons. do you have any solution please let me know.


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

On button click you can do this:

 @api.multi 
 def view_report_button(self):    
    return {'type': 'ir.actions.report.xml','report_name': 'your xml report name','report_type':"qweb- pdf",'data': {dictionary of data goes here},}


Read more about custom qweb reports in odoo:

  1. http://learnopenerp.blogspot.com/2016/09/how-to-create-custom-reports-in-odoo.html

  2. http://learnopenerp.blogspot.com/2016/11/how-to-create-qweb-reports-in-openerp.html

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

Hi,

I try this and no any errors. but didn't generate the report. loading only. what is the usage of data dictionary? i don't have any idea about that.

Related Posts ตอบกลับ มุมมอง กิจกรรม
Custom back button no longer working. แก้ไขแล้ว
2
ต.ค. 20
5913
1
มิ.ย. 20
2620
1
ธ.ค. 22
8924
Quotation Report Customazation แก้ไขแล้ว
2
ก.พ. 24
3657
1
ต.ค. 23
6082