Task 17 — Add Phase 1 widget compute fields and AI hooks:
- account.bank.statement.line: fusion_top_suggestion_id (m2o, unstored),
fusion_confidence_band (selection, unstored), bank_statement_attachment_ids
(one2many compute, mirrors Enterprise's surface field for the OWL widget).
- account.reconcile.model: fusion_ai_confidence_threshold (float).
- Bumps manifest 19.0.1.0.3 → 19.0.1.0.4.
V19 note: dropped @api.depends('id') on _compute_top_suggestion (NotImplementedError
in V19); compute is on-demand for unstored field anyway.
Made-with: Cursor
21 lines
786 B
Python
21 lines
786 B
Python
"""Inherit account.reconcile.model to add Phase 1 AI integration hooks.
|
|
|
|
This is a minimal extension placeholder for now — Phase 1+ phases may
|
|
expand it (e.g., to attach AI confidence rules to reconcile-model
|
|
auto-fires). The shared-field-ownership for `created_automatically`
|
|
already lives in fusion_accounting_core; this file is for fusion_bank_rec
|
|
specific extensions only.
|
|
"""
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class AccountReconcileModel(models.Model):
|
|
_inherit = "account.reconcile.model"
|
|
|
|
fusion_ai_confidence_threshold = fields.Float(
|
|
string="AI confidence threshold",
|
|
default=0.0,
|
|
help="If >0.0, fusion AI suggestions matching this rule are auto-applied "
|
|
"only when their confidence ≥ this threshold. 0.0 = no AI filtering.")
|