Help

0

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

Avatar
vineeth george

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>





1 Comment
Avatar
Discard
Avatar
Sreejith P
-

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

3 Answers
2
Best Answer

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
Discard
0
Avatar
Jefferson
Best Answer

is your views already declared in Manifest?

Avatar
Discard
0
Avatar
Agile
Best Answer

<?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
Discard