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
122 lines
6.4 KiB
XML
122 lines
6.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<templates xml:space="preserve">
|
|
<t t-name="fusion_accounting.InteractiveTable">
|
|
<div class="fusion_interactive_table my-2">
|
|
<!-- Title -->
|
|
<t t-if="title">
|
|
<div class="d-flex align-items-center mb-2">
|
|
<i class="fa fa-table me-2 text-muted"/>
|
|
<strong t-esc="title"/>
|
|
<span class="badge bg-secondary-subtle text-secondary ms-2"
|
|
t-esc="state.rows.length + ' rows'"/>
|
|
</div>
|
|
</t>
|
|
|
|
<!-- Table -->
|
|
<div class="table-responsive">
|
|
<table class="table table-sm table-hover align-middle mb-0">
|
|
<thead>
|
|
<tr>
|
|
<!-- Checkbox column (interactive only) -->
|
|
<t t-if="isInteractive">
|
|
<th class="fit-content px-2">
|
|
<input type="checkbox"
|
|
class="form-check-input"
|
|
t-att-checked="state.selectAll"
|
|
t-on-change="onToggleSelectAll"/>
|
|
</th>
|
|
</t>
|
|
<!-- Data columns -->
|
|
<t t-foreach="columns" t-as="col" t-key="col_index">
|
|
<th class="px-2 py-1" t-esc="col"/>
|
|
</t>
|
|
<!-- AI Recommendation column (interactive only) -->
|
|
<t t-if="isInteractive">
|
|
<th class="px-2 py-1 text-info">AI Recommendation</th>
|
|
<th class="px-2 py-1 text-warning" style="min-width: 180px;">Your Input</th>
|
|
</t>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-foreach="state.rows" t-as="row" t-key="row_index">
|
|
<tr t-att-class="row.selected ? 'table-active' : ''">
|
|
<!-- Checkbox -->
|
|
<t t-if="isInteractive">
|
|
<td class="fit-content px-2">
|
|
<input type="checkbox"
|
|
class="form-check-input"
|
|
t-att-checked="row.selected"
|
|
t-on-change="() => this.onToggleRow(row_index)"/>
|
|
</td>
|
|
</t>
|
|
<!-- Data cells -->
|
|
<t t-foreach="row.cells" t-as="cell" t-key="cell_index">
|
|
<td class="px-2 py-1" t-esc="cell"/>
|
|
</t>
|
|
<!-- AI Recommendation -->
|
|
<t t-if="isInteractive">
|
|
<td class="px-2 py-1">
|
|
<t t-if="row.recommendation">
|
|
<span t-att-class="'badge me-1 ' + recommendationClass(row.recommendation.action)"
|
|
t-esc="recommendationLabel(row.recommendation.action)"/>
|
|
<small class="text-muted" t-esc="row.recommendation.reason"/>
|
|
</t>
|
|
</td>
|
|
<!-- User input -->
|
|
<td class="px-2 py-1">
|
|
<input type="text"
|
|
class="form-control form-control-sm fusion_row_note"
|
|
placeholder="Add your note..."
|
|
t-att-value="row.userNote"
|
|
t-on-input="(ev) => this.onNoteInput(row_index, ev)"/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Bulk Action Bar (interactive only) -->
|
|
<t t-if="isInteractive">
|
|
<div class="fusion_table_action_bar d-flex flex-wrap align-items-center gap-2 p-2 border-top">
|
|
<small class="text-muted me-1">
|
|
<t t-esc="selectedCount"/> selected
|
|
</small>
|
|
<button class="btn btn-success btn-sm"
|
|
t-att-disabled="selectedCount === 0"
|
|
t-on-click="onApplyRecommendations">
|
|
<i class="fa fa-check me-1"/>Apply Recommendations
|
|
</button>
|
|
<t t-if="actionAvailable('flag')">
|
|
<button class="btn btn-outline-warning btn-sm"
|
|
t-att-disabled="selectedCount === 0"
|
|
t-on-click="onFlagSelected">
|
|
<i class="fa fa-flag me-1"/>Flag Selected
|
|
</button>
|
|
</t>
|
|
<t t-if="actionAvailable('create_rule')">
|
|
<button class="btn btn-outline-info btn-sm"
|
|
t-att-disabled="selectedCount === 0"
|
|
t-on-click="onCreateRules">
|
|
<i class="fa fa-plus me-1"/>Create Rules
|
|
</button>
|
|
</t>
|
|
<t t-if="actionAvailable('dismiss')">
|
|
<button class="btn btn-outline-secondary btn-sm"
|
|
t-att-disabled="selectedCount === 0"
|
|
t-on-click="onDismissSelected">
|
|
Dismiss Selected
|
|
</button>
|
|
</t>
|
|
<div class="flex-grow-1"/>
|
|
<button class="btn btn-outline-primary btn-sm"
|
|
t-on-click="onSubmitNotes">
|
|
<i class="fa fa-pencil me-1"/>Submit All Notes to AI
|
|
</button>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</templates>
|