Files
Odoo-Modules/fusion_accounting_ai/report/audit_report_template.xml
gsinghpal 6c72f2ab49 refactor(fusion_accounting): move AI module code into fusion_accounting_ai sub-module
git mv preserves history. fusion_accounting/ retains only __manifest__.py,
__init__.py, CLAUDE.md, and docs/ — the meta-module shell. All Python,
data, views, security, services, static, tests, wizards, report move to
fusion_accounting_ai/. Manifest data list updated; security.xml move to
_core deferred to Task 12.

Made-with: Cursor
2026-04-18 21:45:06 -04:00

85 lines
4.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Report action -->
<record id="action_report_fusion_audit" model="ir.actions.report">
<field name="name">Fusion AI Audit Report</field>
<field name="model">fusion.accounting.dashboard</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">fusion_accounting.audit_report_document</field>
<field name="report_file">fusion_accounting.audit_report_document</field>
<field name="binding_model_id" ref="model_fusion_accounting_dashboard"/>
<field name="binding_type">report</field>
</record>
<!-- Report template -->
<template id="audit_report_document">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<h2>Fusion AI Audit Report</h2>
<p>Company: <span t-field="o.company_id.name"/></p>
<p>Generated: <span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></p>
<hr/>
<h3>Health Summary</h3>
<table class="table table-bordered table-sm">
<thead class="table-light">
<tr>
<th>Domain</th>
<th>Metric</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bank Reconciliation</td>
<td><t t-esc="o.bank_recon_count"/> unmatched lines ($<t t-esc="'%.2f' % o.bank_recon_amount"/>)</td>
<td t-att-class="'text-success' if o.bank_recon_count == 0 else 'text-danger'">
<t t-if="o.bank_recon_count == 0">OK</t>
<t t-else="">Attention</t>
</td>
</tr>
<tr>
<td>Accounts Receivable</td>
<td>$<t t-esc="'%.2f' % o.ar_total"/> outstanding, <t t-esc="o.ar_overdue_count"/> overdue</td>
<td t-att-class="'text-success' if o.ar_overdue_count == 0 else 'text-warning'">
<t t-if="o.ar_overdue_count == 0">OK</t>
<t t-else="">Overdue Items</t>
</td>
</tr>
<tr>
<td>Accounts Payable</td>
<td>$<t t-esc="'%.2f' % o.ap_total"/> total, <t t-esc="o.ap_due_this_week"/> due this week</td>
<td>Info</td>
</tr>
<tr>
<td>HST Balance</td>
<td>$<t t-esc="'%.2f' % o.hst_balance"/></td>
<td><t t-if="o.hst_balance > 0">Owing to CRA</t><t t-else="">Refund Expected</t></td>
</tr>
<tr>
<td>Audit Score</td>
<td><t t-esc="o.audit_score"/>/100 (<t t-esc="o.audit_flag_count"/> flags)</td>
<td t-att-class="'text-success' if o.audit_score >= 80 else ('text-warning' if o.audit_score >= 60 else 'text-danger')">
<t t-if="o.audit_score >= 80">Good</t>
<t t-elif="o.audit_score >= 60">Fair</t>
<t t-else="">Needs Attention</t>
</td>
</tr>
<tr>
<td>Month-End Status</td>
<td><t t-esc="o.month_end_status"/> (<t t-esc="o.month_end_open_items"/> open items)</td>
<td t-att-class="'text-success' if o.month_end_open_items == 0 else 'text-warning'">
<t t-esc="o.month_end_status"/>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
</odoo>