Commit Graph

3 Commits

Author SHA1 Message Date
Carlos Garcia
928568374e Add complexity-driven discovery suggestion wizard
fl_discovery_suggest_wizard.py:
  - fl.discovery.suggest.wizard: reads case complexity (AI analysis or
    rule-based fallback), case type, issue_tag_ids, and flags
    (domestic_violence_flag, respondent_has_counsel, income_imputation_concern)
    to build a pre-checked list of relevant discovery items
  - fl.discovery.suggest.line: one row per suggested item with type,
    directed_to, description, rationale, trigger badge, and min complexity
  - 50+ templates across 10 trigger categories: base, modification,
    dissolution, paternity, alimony, custody, imputation (Barner v. Barner),
    self_employment, domestic_violence, respondent_counsel, complex_only
  - action_create_selected: creates fl.discovery records (draft) and posts
    a chatter summary with all created items; bound to fl.case form

fl_case.py:
  - Add issue_tag_ids Many2many(fl.issue.tag) — field referenced by AI
    engine rule-tagging but not previously declared on the model

fl_discovery_suggest_views.xml:
  - Wizard form: complexity badge, alert box explaining level, editable
    suggestion list with trigger/type/description/rationale columns
  - Action bound to fl.case form via binding_model_id
  - Inherits fl.case form to add issue_tag_ids widget to AI tab

ir.model.access.csv: access rows for both new wizard models

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 00:50:07 -05:00
Carlos Garcia
26f58952b4 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>
2026-05-06 23:49:10 -05:00
Carlos Garcia
1d52d85a78 Phase 1: core models, security, seed data, and backend views
Implements full Phase 1 of the activeblue_familylaw Odoo 18 module:
- 17 Python models (fl.case, fl.party, fl.child, fl.support.calculation,
  fl.fee.waiver, fl.income.withholding, fl.deadline, fl.hearing,
  fl.deposition, fl.discovery, fl.document, fl.caselaw, fl.analysis,
  fl.ai.engine, fl.argument, fl.statute, fl.issue.tag) + hr.expense extension
- 3 wizard stubs (intake, analysis, generate-packet)
- Security: 4 groups (admin/paralegal/portal-petitioner/portal-respondent)
  + record rules scoping portal users to their own cases
- Seed data: issue tags, FL statutes, FL DCF support schedule, ir.sequence
- 13 backend view XML files with FL 61.30 worksheet, fee waiver
  eligibility banner, DV safety resources, emancipation alerts
- Static CSS/JS stubs for Phase 6 portal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 18:52:04 -04:00