From 6cbb5f85fe500cccb67708458447848488a15c5c Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 13:05:23 -0400 Subject: [PATCH] feat(fusion_accounting_bank_rec): fusion-only attachment strip + partner history panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit attachment_strip renders inline mimetype-aware chips linking to /web/content downloads. partner_history_panel calls bank_reconciliation.getPartnerHistory to surface the learned reconcile pattern (preferred strategy, typical cadence) plus the most recent reconciles per partner — context Enterprise's bank-rec widget cannot show because it has no behavioural-learning layer. Made-with: Cursor --- fusion_accounting_bank_rec/__manifest__.py | 7 +++- .../attachment_strip/attachment_strip.js | 27 +++++++++++++ .../attachment_strip/attachment_strip.xml | 18 +++++++++ .../partner_history_panel.js | 34 ++++++++++++++++ .../partner_history_panel.xml | 39 +++++++++++++++++++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.js create mode 100644 fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.xml create mode 100644 fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.js create mode 100644 fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.xml diff --git a/fusion_accounting_bank_rec/__manifest__.py b/fusion_accounting_bank_rec/__manifest__.py index 8e828b1e..87f3ea80 100644 --- a/fusion_accounting_bank_rec/__manifest__.py +++ b/fusion_accounting_bank_rec/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Fusion Accounting — Bank Reconciliation', - 'version': '19.0.1.0.17', + 'version': '19.0.1.0.18', 'category': 'Accounting/Accounting', 'sequence': 28, 'summary': 'Native V19 bank reconciliation widget with AI confidence scoring + behavioural learning.', @@ -92,6 +92,11 @@ Built by Nexa Systems Inc. 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/batch_action_bar/batch_action_bar.xml', 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/reconcile_model_picker/reconcile_model_picker.js', 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/reconcile_model_picker/reconcile_model_picker.xml', + # Fusion-only (Task 36) — attachment strip + partner history panel + 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.js', + 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.xml', + 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.js', + 'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.xml', ], }, 'installable': True, diff --git a/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.js b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.js new file mode 100644 index 00000000..942eac2f --- /dev/null +++ b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.js @@ -0,0 +1,27 @@ +/** @odoo-module **/ + +import { Component } from "@odoo/owl"; + +export class AttachmentStrip extends Component { + static template = "fusion_accounting_bank_rec.AttachmentStrip"; + static props = { + attachments: { type: Array }, + }; + + iconFor(mimetype) { + if (!mimetype) { + return "fa-file"; + } + if (mimetype.startsWith("image/")) { + return "fa-file-image-o"; + } + if (mimetype === "application/pdf") { + return "fa-file-pdf-o"; + } + return "fa-file-o"; + } + + urlFor(att) { + return `/web/content/${att.id}?download=true`; + } +} diff --git a/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.xml b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.xml new file mode 100644 index 00000000..841c03be --- /dev/null +++ b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/attachment_strip/attachment_strip.xml @@ -0,0 +1,18 @@ + + + +
+
+ No attachments +
+ + + + +
+
+
diff --git a/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.js b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.js new file mode 100644 index 00000000..ea0b60ec --- /dev/null +++ b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.js @@ -0,0 +1,34 @@ +/** @odoo-module **/ + +import { Component, onWillStart, useState } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; + +export class PartnerHistoryPanel extends Component { + static template = "fusion_accounting_bank_rec.PartnerHistoryPanel"; + static props = { + partnerId: { type: Number }, + }; + + setup() { + this.bankRec = useService("fusion_bank_reconciliation"); + this.state = useState({ history: null, loading: true }); + + onWillStart(async () => { + try { + this.state.history = await this.bankRec.getPartnerHistory( + this.props.partnerId, + 20, + ); + } finally { + this.state.loading = false; + } + }); + } + + formatAmount(value) { + if (value === undefined || value === null) { + return "0.00"; + } + return Number(value).toFixed(2); + } +} diff --git a/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.xml b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.xml new file mode 100644 index 00000000..b3a359f6 --- /dev/null +++ b/fusion_accounting_bank_rec/static/src/components/bank_reconciliation/partner_history_panel/partner_history_panel.xml @@ -0,0 +1,39 @@ + + + +
+
+ — History +
+
Loading…
+
+
+ Learned pattern: +
Reconciles:
+
+ Preferred strategy: +
+
+ Typical cadence: ~ days +
+
+
Recent reconciles
+
+
+ + $ +
+
+ + ( lines) +
+
+
+ No history yet +
+
+
+
+