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>
31 lines
838 B
Python
31 lines
838 B
Python
from odoo import fields, models
|
|
|
|
|
|
class FlAnalysisWizard(models.TransientModel):
|
|
"""
|
|
Trigger AI analysis on a case.
|
|
Phase 7 — full implementation.
|
|
Phase 1: Stub.
|
|
"""
|
|
_name = 'fl.analysis.wizard'
|
|
_description = 'Trigger AI Analysis Wizard'
|
|
|
|
case_id = fields.Many2one(
|
|
'fl.case', string='Case', required=True
|
|
)
|
|
force_reanalysis = fields.Boolean(
|
|
string='Force Re-analysis',
|
|
help='Run a new analysis even if a recent one exists'
|
|
)
|
|
|
|
def action_run_analysis(self):
|
|
self.env['fl.ai.engine'].analyze_case(self.case_id.id)
|
|
return {
|
|
'type': 'ir.actions.act_window',
|
|
'name': 'Case',
|
|
'res_model': 'fl.case',
|
|
'res_id': self.case_id.id,
|
|
'view_mode': 'form',
|
|
'target': 'current',
|
|
}
|