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

I am trying to replace the invoice report with my own one. We don't use rml and use jrxml from jasper report.

I replace the invoice rml report with a jrxml report. I want to use my own parser for it.

            <delete model="ir.actions.report.xml" search="[('report_name','=','account.invoice')]" />

            <report id="account_invoices_mylayout"
            string="Invoices with MyLayout"
            model="account.invoice"
            name="account.invoice.mylayout"
            rml="../mypath/report1.jrxml"
            auto="False"/>

The previous code will only remove original invoice report and replace it with a jasper report with default model source. How can I change the model to use my parser without wizard ?

In the parser class

    jasper_report.report_jasper('report.' + REPORT_NAME, REPORT_MODEL, parser=my_parser)
อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

REPORT_NAME had to match name of the report in the view ----> name="account.invoice.mylayout"

jasper_report.report_jasper('report.account.invoice.mylayout', ....)

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มี.ค. 15
4367
2
ก.ค. 24
2899
Blank report PDF from Wizard แก้ไขแล้ว
2
เม.ย. 24
2761
1
มิ.ย. 23
1797
4
ต.ค. 20
5702