Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create a report for the Session model in Odoo-9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 486
    Comment on it

    If you want to create report for the session model ,first you have to move on .py file and setup all dependencies module. And For each session, it should display session's name, its start and end, and list the session's time date and unique number.
    For example you can see below code.

    <openerp>
    <data>
        <report id="report_session" model="openacademy.session" string="Session Report" name="openacademy.report_session_view" file="openacademy.report_session" report_type="qweb-pdf">
    
        <template id="report_session_view">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="doc">
                    <t t-call="report.external_layout">
                        <div class="page">
                            <h2 t-field="doc.name">
                            <p>From <span t-field="doc.start_date"> to <span t-field="doc.end_date"></span></span></p>
                            </h2><h3>Attendees:</h3>
                            <ul>
                                <t t-foreach="doc.attendee_ids" t-as="attendee">
                                    <li><span t-field="attendee.name"></span></li>
                                </t>
                            </ul>
                        </div>
                    </t>
                </t>
            </t>
        </template>
    </report></data>
    </openerp>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: