feat(fusion_accounting_bank_rec): mirror Enterprise OWL batch 4 (auxiliary components)

Mirrors 3 OWL components from account_accountant for Phase 1
structural parity:

- quick_create/ (BankRecQuickCreate + BankRecQuickCreateController
  for inline missing-record creation)
- chatter/ (BankRecChatter — extends @mail Chatter with a
  reloadParentView hook for the bound statement line)
- file_uploader/ (BankRecFileUploader — extends @account
  DocumentFileUploader to inject statement_line_id into the
  upload context, targeting account.bank.statement.line)

Renames applied per spec; CSS class
`o_bank_reconciliation_quick_create` ->
`o_fusion_bank_reconciliation_quick_create`.

Manifest version bumped to 19.0.1.0.15.

Module upgrade succeeds, 134 logical tests still pass — completing
the Phase 1 OWL component mirror (Tasks 30-33). All 14 components
across 4 batches are now bundled.

Made-with: Cursor
This commit is contained in:
gsinghpal
2026-04-19 12:55:20 -04:00
parent b06e01babb
commit c9ac4c64fb
5 changed files with 115 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting — Bank Reconciliation',
'version': '19.0.1.0.14',
'version': '19.0.1.0.15',
'category': 'Accounting/Accounting',
'sequence': 28,
'summary': 'Native V19 bank reconciliation widget with AI confidence scoring + behavioural learning.',
@@ -75,6 +75,11 @@ Built by Nexa Systems Inc.
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/search_dialog/search_dialog.xml',
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/search_dialog/search_dialog_list.js',
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/search_dialog/search_dialog_list.xml',
# Batch 4 (Task 33) — auxiliary components
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/quick_create/quick_create.js',
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/quick_create/quick_create.xml',
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/chatter/chatter.js',
'fusion_accounting_bank_rec/static/src/components/bank_reconciliation/file_uploader/file_uploader.js',
],
},
'installable': True,

View File

@@ -0,0 +1,16 @@
/** @odoo-module **/
/**
* Mirrored from `account_accountant/.../chatter/chatter.js`.
* Phase 1 structural parity.
*/
import { Chatter } from "@mail/chatter/web_portal/chatter";
export class BankRecChatter extends Chatter {
static props = [...Chatter.props, "statementLine?"];
async reloadParentView() {
await this.props.statementLine?.load();
}
}

View File

@@ -0,0 +1,29 @@
/** @odoo-module **/
/**
* Mirrored from
* `account_accountant/.../file_uploader/file_uploader.js`.
* Phase 1 structural parity.
*/
import { DocumentFileUploader } from "@account/components/document_file_uploader/document_file_uploader";
export class BankRecFileUploader extends DocumentFileUploader {
/**
* Extends `DocumentFileUploader.getExtraContext` to add the
* `statement_line_id` to the context, used by
* `account.bank.statement.line.create_document_from_attachment` to link
* the uploaded bill back to the originating statement line.
*/
getExtraContext() {
const extraContext = super.getExtraContext();
return {
...extraContext,
statement_line_id: this.props.record.statementLineId,
};
}
getResModel() {
return "account.bank.statement.line";
}
}

View File

@@ -0,0 +1,41 @@
/** @odoo-module **/
/**
* Mirrored from `account_accountant/.../quick_create/quick_create.js`.
* Phase 1 structural parity.
*/
import {
KanbanRecordQuickCreate,
KanbanQuickCreateController,
} from "@web/views/kanban/kanban_record_quick_create";
export class BankRecQuickCreateController extends KanbanQuickCreateController {
static template = "fusion_accounting_bank_rec.BankRecQuickCreateController";
}
export class BankRecQuickCreate extends KanbanRecordQuickCreate {
static template = "fusion_accounting_bank_rec.BankRecQuickCreate";
static props = {
...KanbanRecordQuickCreate.props,
resModel: { type: String },
context: { type: Object },
group: { type: Object, optional: true },
};
static components = { BankRecQuickCreateController };
/**
* Overridden — quick-create flow always works against a synthetic group
* built from the resModel + context props (rather than relying on a
* caller-provided group), matching Enterprise behaviour.
*/
async getQuickCreateProps(props) {
await super.getQuickCreateProps({
...props,
group: {
resModel: props.resModel,
context: props.context,
},
});
}
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="fusion_accounting_bank_rec.BankRecQuickCreate">
<BankRecQuickCreateController t-if="state.isLoaded" t-props="quickCreateProps"/>
</t>
<t t-name="fusion_accounting_bank_rec.BankRecQuickCreateController">
<div class="o_fusion_bank_reconciliation_quick_create o_kanban_record" t-ref="root">
<t t-component="props.Renderer" record="model.root" Compiler="props.Compiler" archInfo="props.archInfo"/>
<div class="d-flex gap-1 button_group p-2">
<button class="btn btn-primary o_kanban_add" t-on-click="() => this.validate('add')" data-hotkey="s">
Add &amp; New
</button>
<button class="btn btn-secondary o_kanban_edit" t-on-click="() => this.validate('add_close')" data-hotkey="shift+s">
Add &amp; Close
</button>
<button class="btn btn-secondary o_kanban_cancel" t-on-click="() => this.cancel(true)" data-hotkey="d">
Discard
</button>
</div>
</div>
</t>
</templates>