diff --git a/docs/superpowers/plans/2026-06-02-accessibility-funding-selector.md b/docs/superpowers/plans/2026-06-02-accessibility-funding-selector.md new file mode 100644 index 00000000..b1e5c818 --- /dev/null +++ b/docs/superpowers/plans/2026-06-02-accessibility-funding-selector.md @@ -0,0 +1,43 @@ +# Accessibility Funding-Source Selector — Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: superpowers:executing-plans (inline) — this is a 3-file change. Steps use `- [ ]` checkboxes. + +**Goal:** Let the rep mark an accessibility assessment's funding source (Private / March of Dimes / ODSP / WSIB / Hardship / Insurance / Other) on the web form, so the generated sale order routes to the correct funding pipeline instead of always defaulting to private pay. + +**Architecture:** The model (`fusion.accessibility.assessment.x_fc_funding_source`) and the SO routing (`_create_draft_sale_order` → `sale_type_map` → `x_fc_sale_type`) already exist (the "2026-04 portal audit fix"). The only gaps: (1) the form has no funding field, (2) the save controller never reads `funding_source` from the POST, (3) `hardship` is missing from the selectable funding sources. The submit JS already serialises every named form field via `FormData`, so no JS change is needed. + +**Tech Stack:** Odoo 19, QWeb portal template, JSON-RPC controller. Module `fusion_portal` (worktree `K:\Github\Odoo-Modules-wt-portal`, branch `feat/assessment-visit`). + +**Verification constraint:** `fusion_portal` depends on Enterprise `knowledge`, so it can NOT be installed on the local Community Docker. Syntax-check with host Python; functional verification is on westin (or a clone): pick "March of Dimes" on a form → the draft SO gets `x_fc_sale_type='march_of_dimes'` and lands in the MOD pipeline. + +--- + +### Task 1: Add Hardship to the funding source + route it + +**Files:** Modify `fusion_portal/models/accessibility_assessment.py` (selection ~:71-87, `sale_type_map` ~:771-779) + +- [ ] **Step 1:** Add `('hardship', 'Hardship Funding')` to the `x_fc_funding_source` selection list (after `'wsib'`). +- [ ] **Step 2:** Add `'hardship': 'hardship',` to `sale_type_map` in `_create_draft_sale_order` (the target `x_fc_sale_type='hardship'` already exists in `fusion_claims` `sale_order.py:332`). +- [ ] **Step 3:** `python -m py_compile fusion_portal/models/accessibility_assessment.py` → no error. +- [ ] **Step 4:** Commit. + +### Task 2: Add the funding select to the shared client-info form + +**Files:** Modify `fusion_portal/views/portal_accessibility_templates.xml` (`accessibility_client_info_section`, ~:366-375) + +- [ ] **Step 1:** Add a new row with a ` +
+
+ + + Determines which sale order / funding workflow this case enters. +
+