primeira versão
This commit is contained in:
47
reports/historico_template.xml
Normal file
47
reports/historico_template.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<odoo>
|
||||
<template id="report_historico_aluno">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page">
|
||||
<h2>Relatório do Aluno: <span t-field="doc.name"/></h2>
|
||||
|
||||
<div class="row mt32 mb32">
|
||||
<div class="col-6">
|
||||
<strong>Idade:</strong> <span t-field="doc.idade"/><br/>
|
||||
<strong>Responsável:</strong> <span t-field="doc.responsavel_financeiro_id.name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Diário de Atividades</h3>
|
||||
<table class="table table-sm table-striped mt-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Hora</th> <!-- Coluna Nova -->
|
||||
<th>Tipo</th>
|
||||
<th>Detalhes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="doc.diario_ids" t-as="line">
|
||||
<td><span t-field="line.data"/></td>
|
||||
<td><span t-field="line.hora_registro"/></td> <!-- Hora -->
|
||||
<td>
|
||||
<!-- Ícones no PDF -->
|
||||
<span t-if="line.tipo == 'entrada'" style="color:green;">🟢 Entrada</span>
|
||||
<span t-if="line.tipo == 'saida'" style="color:red;">🔴 Saída</span>
|
||||
<span t-if="line.tipo == 'ocorrencia'" style="color:orange; font-weight:bold;">⚠️ Ocorrência</span>
|
||||
<span t-if="line.tipo == 'saude'">💊 Saúde</span>
|
||||
<span t-if="line.tipo == 'rotina'">Rotina</span>
|
||||
</td>
|
||||
<td><span t-field="line.descricao"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user