Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
5 Besvarelser
9506 Visninger

Bad Report ReferenceThis report is not loaded into the database: student_management.report_teacher_salary.

happends when i create a  reaport



openerp............



{
    'name': "School management",
    'summary': """school teacher student """,
    'version': '1.0',
    'description': """
Using this application you can manage Teachers and Students details.
=======================================================================
 """,
    'depends': ['base','hr','sale','mail'],
    'data': [
             'school_management_report.xml',
             'views/report_teacher_salary.xml',
             'wizard/teacher_wizard.xml',
             'school_management_view.xml',
             'student_school_email.xml',
            ],
    'installable': True,
}
..................................................................................

school_management_report.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report
            id="report_school_management"
            string="Teacher salary report"
            model="teacher.school"
            report_type="qweb-pdf"
            file="school_management.report_saleorder"
            name="school_management.report_saleorder"
        />
    </data>
</openerp>
.......................................................

report_teacher_salary.xml

<!--Teacher salary report.-->
<openerp>
    <data>
        <template id="report_teacher_salary_document">
            <t t-call="report.external_layout">
                <div class="page">
                    <div class="row">
                        <h3>Teacher's salary report 2017</h3>
                    </div>
                </div>
            </t>
        </template>
         
        <template id="report_teacher_salary">
            <t t-call="report.html_container">
                <t t-foreach="doc_ids" t-as="doc_id">
                    <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'school_management.report_teacher_salary_document')"/>
                </t>
            </t>
        </template>
    </data>
</openerp>





Avatar
Kassér

Add "school_management.report_teacher_salary_document" to report tag. Your mentioned report id and defined report id are different

Bedste svar

Hello Vineeth,

In record action, You have given wrong external id in file and name field,  you have to give template id as below,

school_management_report.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report
            id="report_school_management"
            string="Teacher salary report"
            model="teacher.school"
            report_type="qweb-pdf"
            file="school_management.report_teacher_salary"
            name="school_management.report_teacher_salary"
        />
    </data>
</openerp>

Thanks,


Avatar
Kassér
Bedste svar

I had similar problem. Have you found solution? My issue happened when I back pot v11 report to v10

Avatar
Kassér
Bedste svar

is your views already declared in Manifest?

Avatar
Kassér
Bedste svar

<?xml version="1.0" encoding="UTF-8"?><openerp>

    <data>

        <!-- QWeb Reports -->

    <report 

    id="report_student" 

    string="Student Details" 

    model="student.details" 

    report_type="qweb-pdf" 

    file="student_details.student_qweb_report_summary" 

    name="student_details.student_qweb_report_summary"/>

<template id="student_qweb_report_document">

<t t-call="report.external_layout">

        <div class="page">

            <div class="row">

                <br/>

<br/>

<h3>

                <strong>Student Report</strong><br/>

                <span t-esc="o.partner_id.name"/><br/>

                <span t-esc="o.name"/><br/>

                <span t-esc="o.age"/><br/>

                <span t-esc="o.dept_id.name"/><br/>

                <span t-esc="o.university_id.name"/><br/>

            </h3>

            </div>

                

        </div>

    </t>

</template>  

<template id="student_qweb_report_summary">

   <t t-call="report.html_container">

       <t t-foreach="docs" t-as="o">

           <t t-call="student_details.student_qweb_report_document" t-lang="o.partner_id.lang"/>

       </t>

       

   </t>

</template>

 

    </data>  

</openerp>





An example

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
0
maj 24
1883
2
maj 24
3680
3
feb. 24
3168
2
nov. 22
6003
0
apr. 24
1870