Phase 7: full wizards, auto-generated case tasks, config parameters

fl_intake_wizard.py:
  - Full multi-step intake: parties, income, children, DV flag, fee
    waiver, AI analysis option
  - Creates res.partner → fl.party → fl.case chain (mirrors portal)
  - Triggers fee waiver record creation and Ollama AI analysis
  - Residency warning computed field (FL 61.021 — 6-month check)

fl_generate_packet_wizard.py:
  - Generates selected documents as PDFs via _render_qweb_pdf
  - Handles 4 binding models: fl.case, fl.party, fl.fee.waiver,
    fl.support.calculation, fl.income.withholding
  - Attaches generated PDFs to case chatter with summary note
  - Bound to fl.case form as an action button

fl_analysis_wizard.py:
  - Checks for recent analysis (<24h) before running new one
  - force_reanalysis flag bypasses the lock
  - Shows last analysis age label in form; opens result as dialog
  - Bound to fl.case form as an action button

fl_case.py:
  - _CASE_TASK_TEMPLATES: standard task lists for 6 case types
  - _generate_case_tasks(): creates project.task records from templates
  - Called automatically from _create_case_project on case creation

fl_wizard_views.xml:
  - Form views for all 3 wizards with inline help text
  - Packet wizard bound to fl.case form via binding_model_id

data/case_task_templates.xml:
  - ir.config_parameter records for Ollama URL, model, deadline days,
    mandatory disclosure days, AI lockout hours — all admin-configurable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-05-06 23:49:10 -05:00
parent 6dc2144db7
commit 26f58952b4
7 changed files with 1006 additions and 60 deletions

View File

@@ -38,6 +38,7 @@
'data/fl_deadline_rules.xml',
'data/mail_templates.xml',
'data/fl_caselaw_data.xml',
'data/case_task_templates.xml',
# Views — backend (actions before menus so menuitem refs resolve)
'views/fl_case_views.xml',
'views/fl_party_views.xml',
@@ -51,6 +52,7 @@
'views/fl_analysis_views.xml',
'views/fl_fee_waiver_views.xml',
'views/fl_statute_views.xml',
'views/fl_wizard_views.xml',
'views/menu_views.xml',
# Phase 4 — QWeb PDF Reports
'report/report_financial_affidavit_short.xml',