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

I want to add a button in a form view, the action of this is to print the report. How can I do this? it seems like printing report in Odoo 12 is far different from Odoo10. can someone have the tutorial for this scenario? Thanks :)

아바타
취소

Thanks Niyas and Sudhir

베스트 답변

Hi,

Check the code of the print button added in the sale order form.


See a sample below:

return self.env.ref('test.test_report').report_action(record_id)

in the below image you can see the code of the print button in the sale order form.


Thanks

아바타
취소
베스트 답변

As Niyas said, you can get the reference from the core modules like Sales, Purchase.

Ex:

return self.env.ref('module_name.XML_ID_of_report').report_action(self)


아바타
취소
관련 게시물 답글 화면 활동
3
10월 23
8769
1
9월 23
3317
1
5월 23
2253
2
4월 23
2808
1
3월 23
2186