콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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.

관련 게시물 답글 화면 활동
2
10월 20
5724
1
6월 20
2456
1
12월 22
8746
2
2월 24
3541
1
10월 23
5687