primeira versão
This commit is contained in:
0
reports/financeiro_report.xml
Normal file
0
reports/financeiro_report.xml
Normal file
167
reports/financeiro_template.xml
Normal file
167
reports/financeiro_template.xml
Normal file
@@ -0,0 +1,167 @@
|
||||
<odoo>
|
||||
<record id="action_report_financeiro_mensal" model="ir.actions.report">
|
||||
<field name="name">Fluxo de Caixa Mensal</field>
|
||||
<field name="model">recreacao.financeiro.wizard</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">plugin_recre.template_financeiro_mensal</field>
|
||||
<field name="report_file">plugin_recre.template_financeiro_mensal</field>
|
||||
<field name="print_report_name">'Fluxo_Caixa_%s' % object.data_inicio</field>
|
||||
<field name="binding_model_id" ref="model_recreacao_financeiro_wizard"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
||||
<template id="template_financeiro_mensal">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<div class="page" style="font-family: Arial, sans-serif;">
|
||||
|
||||
<div class="text-center mt-4 mb-4">
|
||||
<h2>Relatório de Fluxo de Caixa</h2>
|
||||
<p>
|
||||
Período: <strong><span t-esc="data_inicio" t-options='{"widget": "date"}'/></strong>
|
||||
até <strong><span t-esc="data_fim" t-options='{"widget": "date"}'/></strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<h4 style="color: #28a745; border-bottom: 2px solid #28a745; padding-bottom: 5px;">
|
||||
🟢 Entradas (Receitas)
|
||||
</h4>
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2;">
|
||||
<th>Data</th>
|
||||
<th>Descrição</th>
|
||||
<th>Forma Pagto</th>
|
||||
<th>Status</th>
|
||||
<th class="text-end">Valor (R$)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="entradas" t-as="line">
|
||||
<td><span t-field="line.data_vencimento"/></td>
|
||||
<td>
|
||||
<span t-field="line.name"/>
|
||||
<span t-if="line.partner_id" style="font-size: 0.8em; color: gray;">
|
||||
(<span t-field="line.partner_id.name"/>)
|
||||
</span>
|
||||
</td>
|
||||
<td><span t-field="line.forma_pagamento"/></td>
|
||||
<td>
|
||||
<t t-if="line.status == 'pago'">
|
||||
<span style="background-color: #d4edda; color: #155724; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; border: 1px solid #c3e6cb;">
|
||||
Pago
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="line.status == 'pendente'">
|
||||
<span style="background-color: #fff3cd; color: #856404; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; border: 1px solid #ffeeba;">
|
||||
Pendente
|
||||
</span>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-end"><span t-field="line.valor"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="fw-bold">
|
||||
<td colspan="4" class="text-end">TOTAL ENTRADAS:</td>
|
||||
<td class="text-end" style="color: #28a745; font-weight: bold;">
|
||||
R$ <span t-esc="'{:.2f}'.format(total_entradas).replace('.', ',')"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-5">
|
||||
<h4 style="color: #dc3545; border-bottom: 2px solid #dc3545; padding-bottom: 5px;">
|
||||
🔴 Saídas (Despesas)
|
||||
</h4>
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr style="background-color: #f2f2f2;">
|
||||
<th>Data</th>
|
||||
<th>Descrição</th>
|
||||
<th>Forma Pagto</th>
|
||||
<th>Status</th>
|
||||
<th class="text-end">Valor (R$)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="saidas" t-as="line">
|
||||
<td><span t-field="line.data_vencimento"/></td>
|
||||
<td>
|
||||
<span t-field="line.name"/>
|
||||
<span t-if="line.partner_id" style="font-size: 0.8em; color: gray;">
|
||||
(<span t-field="line.partner_id.name"/>)
|
||||
</span>
|
||||
</td>
|
||||
<td><span t-field="line.forma_pagamento"/></td>
|
||||
<td>
|
||||
<t t-if="line.status == 'pago'">
|
||||
<span style="background-color: #d4edda; color: #155724; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; border: 1px solid #c3e6cb;">
|
||||
Pago
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="line.status == 'pendente'">
|
||||
<span style="background-color: #fff3cd; color: #856404; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; border: 1px solid #ffeeba;">
|
||||
Pendente
|
||||
</span>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-end"><span t-field="line.valor"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="fw-bold">
|
||||
<td colspan="4" class="text-end">TOTAL SAÍDAS:</td>
|
||||
<td class="text-end" style="color: #dc3545; font-weight: bold;">
|
||||
R$ <span t-esc="'{:.2f}'.format(total_saidas).replace('.', ',')"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<div class="col-5 offset-7">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>Total Entradas (+)</td>
|
||||
<td class="text-end text-success">
|
||||
<span t-esc="'{:.2f}'.format(total_entradas).replace('.', ',')"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Saídas (-)</td>
|
||||
<td class="text-end text-danger">
|
||||
<span t-esc="'{:.2f}'.format(total_saidas).replace('.', ',')"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="background-color: #e9ecef; font-weight: bold; font-size: 1.1em;">
|
||||
<td>SALDO DO PERÍODO (=)</td>
|
||||
<td class="text-end">
|
||||
R$ <span t-esc="'{:.2f}'.format(saldo_final).replace('.', ',')"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5" style="page-break-inside: avoid;">
|
||||
<div class="col-12 mt-4">
|
||||
<div style="border-top: 1px solid black; width: 40%; margin: 0 auto; text-align: center; padding-top: 5px;">
|
||||
<span>Responsável Financeiro</span><br/>
|
||||
<span style="font-size: 0.8em; color: gray;">Assinatura do Fechamento</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-muted text-center mt-5" style="font-size: 0.8em;">
|
||||
Relatório gerado em <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%d/%m/%Y %H:%M')"/>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
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>
|
||||
12
reports/report.xml
Normal file
12
reports/report.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<odoo>
|
||||
<record id="action_report_historico_aluno" model="ir.actions.report">
|
||||
<field name="name">Histórico Mensal</field>
|
||||
<field name="model">recreacao.crianca</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<!-- O nome agora começa com plugin_recre -->
|
||||
<field name="report_name">plugin_recre.report_historico_aluno</field>
|
||||
<field name="report_file">plugin_recre.report_historico_aluno</field>
|
||||
<field name="binding_model_id" ref="model_recreacao_crianca"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user