8 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
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
Carlos Garcia
7ce691a394 Phase 5: Full AI engine + caselaw seed data (23 FL cases)
fl_ai_engine.py: Complete Ollama integration with 7-step pipeline:
rule-based issue tagging, caselaw matching (3rd DCA-prioritized),
case context serialization, prompt construction, Ollama HTTP call
(llama3.1 at 192.168.2.10:11434), JSON parsing with fence-strip,
and fl.analysis persistence with attorney referral chatter alert.

fl_caselaw_data.xml: 23 seeded Florida cases covering modification
threshold (Daly, Regan, Pimm, El Kohen, Rolfe), income imputation
(Barner, Sitterson), self-employment (Smith, Young), timesharing
(Freid, Kennedy, Boykin), domestic violence (Conlin, Kahle),
default judgment (Lindsey, North), residency (Fults), parenting
class (Maddox), fee waiver (Abdool, Kielbania), disclosure,
withholding, above-schedule, and discovery sanctions.

fl_case.py: trigger_ai_analysis() wired to engine.analyze_case();
returns form popup of fl.analysis result.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 23:39:41 -04:00
Carlos Garcia
7a7463a2d1 Phase 4: QWeb PDF reports (12 court documents)
Financial affidavits (FL-12.902(b)/(c)), child support worksheet
(FL-12.902(e)), motion to modify (FL 61.14), notice of deposition
(FL 1.310), motion to compel (FL 1.380), income withholding order
(FL 61.1301/FL SDU), fee waiver application (FL 57.082), SSN notice
(FL-12.930(a) — filed under seal), mandatory disclosure certificate
(FL-12.932), default motion packet (FL 12.922 — 3-part), and parenting
plan (FL-12.995(a)). All 12 reports registered in __manifest__.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 23:34:37 -04:00
Carlos Garcia
fa0905ddbb Phase 3: Full Discovery + Deposition workflow
fl_deposition.py — Full implementation:
- Calendar event sync for all scheduled depositions
- Notice validation: FL 1.310(b) 10-day minimum; days_notice + notice_valid computed
- Duces tecum document list field with production instructions
- Workflow buttons: Mark Noticed, Confirm, Completed, No-Show, Reschedule, Cancel
- action_no_show: auto-creates Motion to Compel deadline (FL 1.380, 20 days),
  project task with step-by-step instructions, urgent chatter alert
- Court reporter field, transcript tracking, key findings summary

fl_discovery.py — Full implementation:
- action_mark_served: creates fl.deadline for 30-day response window
- action_flag_deficient: creates deficiency notice deadline (good-faith prerequisite)
- action_file_motion_to_compel: FL 1.380 deadline + project task with instructions
- admissions_deemed computed: FL 1.370 auto-deemed-admitted after 30 days (critical)
- _cron_discovery_overdue_alerts: daily check — overdue responses + deemed admissions
  with urgent chatter alerts distinguishing regular overdue vs. deemed-admitted
- sanctions_requested field for FL 1.380(a)(4) expense awards

Enhanced views:
- fl_deposition_views: calendar view, notice validation banners, no-show alert,
  duces tecum section, workflow status bar, results section
- fl_discovery_views: FL 1.370 deemed-admitted critical red banner,
  overdue response warning, subpoena info section, Motion to Compel section,
  tree with inline action buttons, full search with filter presets

ir.cron: added daily discovery overdue alert job to fl_deadline_rules.xml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 23:20:40 -04:00
Carlos Garcia
7c865c8c22 Phase 2: Deadlines + Calendar integration
Full fl_deadline.py:
- Calendar event creation/update on every deadline (all-day events)
- _cron_check_default_judgment: FL 12.922 — if respondent misses Day 20
  answer deadline, auto-creates Motion for Default deadline (5 days),
  project task, and urgent chatter alert
- _cron_deadline_alerts: 7/3/1-day and overdue chatter alerts
- Complete service-anchored deadline set: response (Day 20), financial
  disclosure + mandatory disclosure cert (Day 45), discovery opens (Day 20),
  respondent parenting class (Day 60), 120-day service max
- context-flag pattern (_no_calendar_sync) to prevent recursive write loops

Full fl_hearing.py:
- Calendar event sync (show_as=busy, confidential)
- Pre-hearing checklist computed fields: parenting class (FL 61.21),
  discovery cutoff (hearing -30 days), financial disclosure status
- Workflow buttons: Mark Completed, Mark Continued, Cancel
- _create_hearing_deadline: creates fl.deadline record for each hearing

New data/fl_deadline_rules.xml:
- ir.cron: Daily Deadline Alerts (fl_deadline._cron_deadline_alerts)
- ir.cron: Default Judgment Check (fl_deadline._cron_check_default_judgment)
- ir.cron: Emancipation Alerts (fl_child._cron_emancipation_alerts)

New data/mail_templates.xml:
- Deadline Alert Upcoming (EN)
- Deadline Alert OVERDUE (EN)
- Portal Welcome (EN + ES bilingual)
- Default Judgment Window Alert (EN)

Enhanced views: deadline + hearing now have calendar view, search view
with filters (overdue, due this week, by type), and group-by options.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 23:16:24 -04: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