report medicine to pdf
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
'views/clinic_prescription_views.xml',
|
||||
'views/clinic_prescription_line_views.xml',
|
||||
'views/clinic_service_views.xml',
|
||||
'reports/clinic_medicine_report.xml',
|
||||
'views/clinic_menus.xml',
|
||||
],
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_clinic_medicine_template">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.internal_layout">
|
||||
<div class="page">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tên thuốc</th>
|
||||
<th>Số lượng còn trong kho</th>
|
||||
<th>Giá</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="docs" t-as="medicine"
|
||||
t-att-style="medicine.stock < 10 and 'color: red;' or ''">
|
||||
<td style="width: 30%">
|
||||
<t t-esc="medicine.name" />
|
||||
</td>
|
||||
<td style="width: 30%">
|
||||
<t t-esc="medicine.stock" />
|
||||
</td>
|
||||
<td style="width: 30%">
|
||||
<t t-esc="medicine.price" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<record id="report_clinic_medicine" model="ir.actions.report">
|
||||
<field name="name">Báo cáo số lượng thuốc</field>
|
||||
<field name="model">clinic.medicine</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">clinic_management.report_clinic_medicine_template</field>
|
||||
<field name="report_file">clinic_management.report_clinic_medicine_template</field>
|
||||
<field name="binding_model_id" ref="clinic_management.model_clinic_medicine" />
|
||||
<field name="binding_type">report</field>
|
||||
<field name="binding_view_types">list</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user