# Checkpoint 260 — BE-036 approved technical proposal archive

**Date:** 2026-10-26  
**Story:** BE-036 — Save approved PDF to opportunity/project archive  
**Status:** PARTIAL  
**Classification:** 17 DONE, 122 PARTIAL, 15 MISSING, 10 BLOCKED of 164 stories (10.4% DONE)

## Delivered

- Odoo now renders an approved CRM technical proposal through a bilingual QWeb report, then stores it as a private `ir.attachment` against a separate immutable archive record. Archive records include the approval event, source revision, company, language, actor/time, project links and PDF checksum. A unique company/suggestion/revision key makes creation idempotent.
- Creation requires a distinct Sales Manager/Owner reviewer and a current source revision. The bridge checks the active company and CRM/project record access for list/download operations. Odoo project workspaces can list and retrieve only archives linked to an accessible project.
- The authenticated BFF adds guarded create/list and opportunity/project PDF routes. It validates returned company, base64, `%PDF-` signature, file size and filename, and responds with `private, no-store` headers.
- React can save the PDF from an approved CRM proposal card and reopen it from the opportunity. The project workspace has an Approved proposal archive tab for linked documents. English and Arabic UI labels are provided.
- Archiving is internal retention only. It does not send, email, publish or make a customer-facing release.

## Verification

- Fresh clean isolated all-module Odoo 20 run: **373 tests, 0 failures, 0 errors**. QA database: `be_qa_20261026_185819_9e25`.
- Complete backend test suite: **238 passed, 2 skipped; 265 subtests passed**.
- React unit suite: **80 passed**.
- Focused Playwright synthetic journey: **1 passed**, covering independent approval, archive action, visible saved archive and PDF link.
- Vite production build passed. Python compilation, report XML parse and `git diff --check` passed.
- Detailed machine-readable evidence: [TECHNICAL_PROPOSAL_ARCHIVE_QA.json](TECHNICAL_PROPOSAL_ARCHIVE_QA.json). Screenshot: [synthetic React archive state](frontend/screenshots/crm-technical-proposal-archive-synthetic.png).

## Remaining acceptance

BE-036 remains PARTIAL. The browser journey uses mocked Odoo responses. Still required: live authenticated Sales Manager/Owner/PM tests on a disposable clone; intended user, project and cross-company permission matrix; visual verification of a real QWeb PDF in the normal runtime; Arabic PDF review; and approval of customer release authority. No external send path was implemented. The shared `namaa_ksa` database was not changed for this feature.

## Local demo rollout

After isolated QA passed, a protected dump was created and its archive listing verified before deployment: `/tmp/namaa_ksa_before_be036_20261026.dump` (10,858,665 bytes, mode 0600; its SHA-256 matches the container copy). `namaa_ai_bridge` was upgraded on `namaa_ksa` to **20.0.1.0.28**. React and backend images were rebuilt and restarted. Odoo login, local React demo, BFF health, published QA JSON and public `https://namaa-react-ksa.ngrok-free.app/demo.html` returned HTTP 200. No business records were created/edited during rollout. The regenerated demo reports Checkpoint 260 and current story counts.
