Migrate AI engine to Claude API; convert stage field to Many2one Kanban model

- Replace fl.case.stage Selection field with Many2one → fl.case.stage model,
  enabling Kanban grouping and dynamic stage management
- Add FlCaseStage model (sequence, fold, description) and fl_stage_data.xml
  with all 11 procedural stages seeded with noupdate=1
- Migrate fl_ai_engine.py from Ollama/llama3.1 to Claude API
  (claude-sonnet-4-20250514); key from ir.config_parameter fl_ai.claude_api_key
- Fix stale field references in _rule_based_tagging and _build_case_context:
  employment/income now read from party_ids, timesharing fields corrected
- Add _fallback_complexity() for graceful degradation when API unavailable
- Add Kanban view to fl_case_views.xml; update action view_mode to kanban,tree,form
- Add fl.case.stage ACL entries to ir.model.access.csv

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 17:45:26 +00:00
parent c937282091
commit b8ab8494c7
6 changed files with 313 additions and 163 deletions

View File

@@ -8,7 +8,7 @@
Covers child support modification, dissolution of marriage,
and paternity cases in Miami-Dade County (11th Circuit).
Includes FL 61.30 child support calculator, document generation,
deadline tracking, and AI-powered case law analysis via Ollama.
deadline tracking, and AI-powered case law analysis via Claude API.
""",
'author': 'Active Blue LLC',
'website': 'https://avc.activeblue.net',
@@ -31,6 +31,7 @@
'security/fl_security.xml',
'security/ir.model.access.csv',
# Seed data (load before views)
'data/fl_stage_data.xml',
'data/fl_issue_tags.xml',
'data/fl_statute_data.xml',
'data/fl_support_schedule.xml',