Accountify architecture¶
Use Odoo as the authority for final accounting mutations. Custom services may rank suggestions, orchestrate work, and record an audit trail, but should call one reviewed Odoo transaction for reconciliation or posting.
flowchart LR
subgraph UI["Accountify UI"]
Staff["Staff app: queues, suggestions, approvals"]
Client["Client portal: reports, uploads, requests"]
Admin["Admin setup: tenant deployment and health"]
end
subgraph Backend["Accountify backend"]
Suggest["Suggestion engines"]
Orchestrate["Orchestration: locks, idempotency, readback"]
Audit["Operational audit and repair tasks"]
end
subgraph Odoo["Client Odoo Online database"]
Records["Business records and configuration"]
Wrapper["Studio webhook and server action"]
Native["Native ledger, tax, purchase, and stock logic"]
end
Staff --> Suggest
Client --> Backend
Admin --> Orchestrate
Suggest --> Records
Orchestrate --> Wrapper
Wrapper --> Native
Native --> Audit
Reconciliation sequence¶
flowchart TB
subgraph Prepare["Read, score, and approve"]
direction LR
A["1. Load unreconciled statement lines"]
B["2. Rank open residual move lines"]
C["3. User approves candidates"]
D["4. Authorize, lock, and reserve idempotency key"]
A --> B --> C --> D
end
subgraph Execute["Execute and verify"]
direction LR
E["5. Call signed Studio webhook"]
F["6. Validate company, state, residuals, accounts, and lock dates"]
G["7. Reconcile in one Odoo transaction"]
H["8. Read back and audit final state"]
E --> F --> G --> H
end
Prepare --> Execute
Decision flow¶
flowchart TD
Start["User clicks Reconcile"]
Invalid{"Already reconciled, changed, wrong company, or locked period?"}
Reject["Reject or route to review"]
Exact{"Residuals exactly offset?"}
ExactAction["Call native exact reconciliation"]
Partial{"Partial explicitly approved?"}
PartialAction["Partial reconcile and leave residual open"]
Adjustment{"Approved fee, rounding, discount, or write-off?"}
AdjustmentAction["Create explicit adjustment and reconcile"]
Review["Manual accounting review"]
Verify["Read back, audit, and update task state"]
Start --> Invalid
Invalid -->|Yes| Reject
Invalid -->|No| Exact
Exact -->|Yes| ExactAction
Exact -->|No| Partial
Partial -->|Yes| PartialAction
Partial -->|No| Adjustment
Adjustment -->|Yes| AdjustmentAction
Adjustment -->|No| Review
Reject --> Verify
ExactAction --> Verify
PartialAction --> Verify
AdjustmentAction --> Verify
Review --> Verify
Bootstrap lifecycle¶
flowchart TB
subgraph Provision["Provision tenant"]
direction LR
Connect["1. Connect with tenant API identity"]
Discover["2. Discover models, fields, ACLs, and company context"]
Install["3. Install or update automation and server action"]
Store["4. Store webhook metadata, version, and code hash"]
Connect --> Discover --> Install --> Store
end
subgraph Operate["Operate safely"]
direction LR
Health["5. Run no-op health check"]
Enable["6. Enable workflow for tenant"]
Drift["Scheduled drift check"]
Disable["Disable workflow and open repair task"]
Health --> Enable --> Drift
Drift -->|Healthy| Enable
Drift -->|Drift detected| Disable
end
Provision --> Operate
These diagrams describe an integration pattern, not model metadata. Validate every model and field against the current runtime snapshot before implementation.