Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
10698 Widoki

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.


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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.

Powiązane posty Odpowiedzi Widoki Czynność
2
paź 20
6226
1
cze 20
2865
1
gru 22
9187
2
lut 24
3897
1
paź 23
6815