Commit Graph

2 Commits

Author SHA1 Message Date
49358183e7 Add self-hosted e-signature workflow (canvas pad + PyMuPDF embedding)
- fl.signature.request: token-protected request linking an fl.document to a
  signer (res.partner). State machine: draft → prepared → sent → signed |
  declined | expired. Per-report _SIGNATURE_COORDS map plus DOC_TYPE_TO_REPORT
  for resolving the QWeb report template and the signature block rectangle
- action_prepare renders the QWeb PDF and stores it; action_send_to_signer
  emails a one-time link /familylaw/sign/<token> (256-bit token, 14-day expiry,
  hourly cron sweeps stale links)
- apply_signature decodes the canvas-pad PNG, embeds it at the page-relative
  rectangle via PyMuPDF, attaches the signed PDF to the fl.document, marks
  the document signed, and audits the signer IP + timestamp
- Public portal controller (/familylaw/sign/<token>): GET shows the unsigned
  PDF in an iframe + inline HTML5 canvas pad (no external JS, mouse + touch);
  POST submits the PNG; separate decline endpoint. Token+state checks gate
  every transition
- action_validate_pdfa on the signed request reuses the e-filing pikepdf
  check (markers + OutputIntents) so e-filing-bound docs can be re-validated
- Wiring: models/__init__, controllers/__init__, manifest entry, ACL for the
  request, Signature Requests menu under Cases, signature_request_ids on
  fl.case with a Filings-tab list, "Request Signature" header button, and a
  cron for expiry
- Note: Odoo Sign / DocuSign / HelloSign deliberately NOT used per CLAUDE.md
  spec (HIPAA + FL court e-signature compliance)
- Verified: throwaway-DB install passes cleanly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 20:43:09 +00:00
Carlos Garcia
6dc2144db7 Phase 6: portal, website intake, calculator, and case law library
- controllers/portal.py: FamilyLawPortal with 8 routes (cases list,
  case detail, calculator pre-fill, caselaw library, deadline complete
  AJAX, public intake landing/form/submit)
- views/portal_case_templates.xml: portal home card, case list, full
  case detail with timeline widget, AI summary, DV safety banner
- views/portal_calculator_templates.xml: FL 61.30 interactive calculator
- views/portal_caselaw_templates.xml: searchable case law library (EN/ES)
- views/website_intake_templates.xml: public 4-step intake form with DV
  quick-exit, fee waiver, and intake confirmation page
- static/src/css/familylaw_portal.css: full portal/website CSS (EN/ES
  lang toggle, deadline card color coding, timeline, AI summary box)
- static/src/js/fl_calculator.js: FL 61.30 schedule lookup, above-
  schedule formula, FL 61.30(11)(b) substantial timesharing calculation
- static/src/js/fl_timeline.js: deadline timeline widget with filter
  buttons and mark-complete AJAX
- __init__.py: import controllers package
- __manifest__.py: add Phase 6 portal view files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 23:42:37 -05:00