Files
Odoo-Tutorial/clinic_management/reports/clinic_medicine_report.xml
T
2025-03-22 11:08:34 +07:00

47 lines
2.0 KiB
XML

<?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 &lt; 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>