action print pdf
This commit is contained in:
@@ -25,6 +25,8 @@ Long description of module's purpose
|
||||
'security/ir.model.access.csv',
|
||||
'views/student_student_views.xml',
|
||||
'views/student_course_views.xml',
|
||||
'reports/student_report_template.xml',
|
||||
'reports/student_report.xml',
|
||||
'views/student_menus.xml',
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="report_student_course" model="ir.actions.report">
|
||||
<field name="name">Student Course Report</field>
|
||||
<field name="model">student.course</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">student_management.report_student_template</field>
|
||||
<field name="report_file">student_management.report_student_template</field>
|
||||
<field name="binding_model_id" ref="student_management.model_student_course" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_student_template">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.internal_layout">
|
||||
<div class="page">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Học sinh</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="doc.student_ids" t-as="student">
|
||||
<td>
|
||||
<t t-esc="student.name" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user