CREATE MATERIALIZED VIEW fusion_unreconciled_bank_line_mv pre-computes the data the kanban widget needs (top suggestion, confidence band, attachment count, partner reconcile hint) so that listing 50-100 lines is one indexed query instead of N+1. Refresh strategy: - Triggered on fusion.reconcile.suggestion create/write (best-effort, never poisons the originating transaction) - Cron (every 5 min) — added in Task 25 The MV is created in the model's init() (Odoo calls this on install/upgrade). The SQL DDL is idempotent (CREATE MATERIALIZED VIEW IF NOT EXISTS / CREATE INDEX IF NOT EXISTS) and includes a UNIQUE(id) index so REFRESH MATERIALIZED VIEW CONCURRENTLY is supported. _refresh() falls back to a blocking refresh on the first call after creation. Made-with: Cursor
1.4 KiB
1.4 KiB
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | access_fusion_reconcile_pattern_user | pattern user | model_fusion_reconcile_pattern | fusion_accounting_core.group_fusion_accounting_user | 1 | 0 | 0 | 0 |
| 3 | access_fusion_reconcile_pattern_admin | pattern admin | model_fusion_reconcile_pattern | fusion_accounting_core.group_fusion_accounting_admin | 1 | 1 | 1 | 1 |
| 4 | access_fusion_reconcile_precedent_user | precedent user | model_fusion_reconcile_precedent | fusion_accounting_core.group_fusion_accounting_user | 1 | 0 | 0 | 0 |
| 5 | access_fusion_reconcile_precedent_admin | precedent admin | model_fusion_reconcile_precedent | fusion_accounting_core.group_fusion_accounting_admin | 1 | 1 | 1 | 1 |
| 6 | access_fusion_reconcile_suggestion_user | suggestion user | model_fusion_reconcile_suggestion | fusion_accounting_core.group_fusion_accounting_user | 1 | 0 | 0 | 0 |
| 7 | access_fusion_reconcile_suggestion_admin | suggestion admin | model_fusion_reconcile_suggestion | fusion_accounting_core.group_fusion_accounting_admin | 1 | 1 | 1 | 1 |
| 8 | access_fusion_bank_rec_widget_user | bank rec widget user | model_fusion_bank_rec_widget | fusion_accounting_core.group_fusion_accounting_user | 1 | 1 | 1 | 1 |
| 9 | access_fusion_unreconciled_bank_line_mv_user | unreconciled bank line mv user | model_fusion_unreconciled_bank_line_mv | fusion_accounting_core.group_fusion_accounting_user | 1 | 0 | 0 | 0 |
| 10 | access_fusion_unreconciled_bank_line_mv_admin | unreconciled bank line mv admin | model_fusion_unreconciled_bank_line_mv | fusion_accounting_core.group_fusion_accounting_admin | 1 | 0 | 0 | 0 |