# Checkpoint 291 — Project-attributed cash-flow report (2026-10-27)

## Change

- BE-081's React accounting workspace now supports selecting a project/analytic account on Cash Flow as well as Profit and Loss.
- Odoo allocates each cash movement using the analytic percentage on its counterpart journal item, retaining the full counterpart balance as the allocation denominator. A split-coded line therefore contributes only its assigned share to the project result.
- Project-filtered cash flow omits opening and closing cash balances because these are company balances, not project-attributable balances. The UI explains that scope in Arabic and English. Company-wide cash flow keeps its existing opening/closing balance lines.
- The BFF accepts the analytic filter for P&L and Cash Flow only; other report types continue to reject it. PDF and XLSX export receive the same validated filter.

## Verification

- Full `TestAccReports` suite on a disposable clone of `namaa_ksa`: **8 passed, 0 failures, 0 errors**. The new allocation regression verifies a SAR 100 cash movement with 50% project analytic allocation reports a SAR 50 project cash outflow, while company-wide movement remains SAR 100. Project-filtered report has no company opening/closing balance lines.
- Backend report and PDF/XLSX boundary tests: **3 passed**.
- React accounting reports Playwright test: **1 passed**, covering project selector visibility and analytic-filter query on both P&L and Cash Flow.
- Authenticated finance-user React→BFF→Odoo run on a disposable clone: **1 passed**. The finance user selected the synthetic project analytic account; the live report returned the expected SAR 50 project outflow from a SAR 100 cash move allocated at 50%, omitted company opening/closing balances, and downloaded both filtered XLSX and PDF files. Native Odoo readback confirmed company, analytic account, expense account and amount. Accounting KSA security suite passed **15/15** in the same clone.
- Local rollout is also verified: a protected `namaa_ksa` backup was made at `/tmp/namaa_ksa_before_project_cf_deps_20261027.dump` (mode 0600), `namaa_ai_bridge` was upgraded, and its required `mrp` / `be_boq_mrp` dependencies were installed. React at `localhost:3200` signed in and returned SAR 50 for a clearly labeled SAR 100 / 50% analytic **draft**. Filtered PDF/XLSX downloads passed; no journal entry was posted. Evidence screenshot: [local runtime](frontend/screenshots/live-project-cash-flow-local.png).
- Vite production build passed. `py_compile` and `git diff --check` passed.
- The initial full-suite run exposed a stale account-cache issue in the test fixture after it dynamically created a cash account. The fixture now resets the report engine's account cache before assertions; the complete suite then passed.
- The isolated QA clone was dropped and left its source unchanged. The separate local rollout intentionally changed shared demo `namaa_ksa` as described above; the pre-upgrade backup is available for rollback. Odoo still logs existing missing-table messages for `be.project.charter`, `be.project.charter.event`, and `be.project.closeout`; they did not prevent this finance journey but remain an unrelated runtime health issue to investigate.

## Status

BE-081 remains **PARTIAL**. Project P&L and analytic-attributed cash movement now have live finance-role evidence. Accountant UAT, broader company/project access coverage, Arabic/accessibility review and full A1–A4 acceptance remain open. The project-filtered cash-flow view reports attributable movement only; it does not claim project-owned cash balances.

Authenticated isolated evidence: [Project cash-flow live QA](PROJECT_CASH_FLOW_LIVE_QA.json) · [Screenshot](frontend/screenshots/live-project-cash-flow.png).
