# HG changeset patch
# Parent c140f0a861a08881d8737bca0ffb83904a2059a3

Index: addons/openacademy/__manifest__.py
===================================================================
--- addons.orig/openacademy/__manifest__.py	2014-08-29 08:39:43.975536806 +0200
+++ addons/openacademy/__manifest__.py	2014-08-29 08:39:52.000000000 +0200
@@ -30,6 +30,7 @@
         'templates.xml',
         'views/openacademy.xml',
         'views/partner.xml',
+        'reports.xml',
     ],
     # only loaded in demonstration mode
     'demo': [
Index: foo/openacademy/reports.xml
===================================================================
--- /dev/null
+++ foo/openacademy/reports.xml
@@ -0,0 +1,32 @@
+<odoo>
+
+    <record id="report_session" model="ir.actions.report">
+        <field name="name">Session Report</field>
+        <field name="model">openacademy.session</field>
+        <field name="report_type">qweb-pdf</field>
+        <field name="report_name">openacademy.report_session_view</field>
+        <field name="report_file">openacademy.report_session</field>
+        <field name="binding_model_id" ref="model_openacademy_session"/>
+        <field name="binding_type">report</field>
+    </record>
+
+    <template id="report_session_view">
+        <t t-call="web.html_container">
+            <t t-foreach="docs" t-as="doc">
+                <t t-call="web.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"/></p>
+                        <h3>Attendees:</h3>
+                        <ul>
+                            <t t-foreach="doc.attendee_ids" t-as="attendee">
+                                <li><span t-field="attendee.name"/></li>
+                            </t>
+                        </ul>
+                    </div>
+                </t>
+            </t>
+        </t>
+    </template>
+
+</odoo>
