Files
famlaw/activeblue_familylaw/wizard/fl_intake_wizard.py
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

57 lines
2.1 KiB
Python

from odoo import api, fields, models
class FlIntakeWizard(models.TransientModel):
"""
Guided case creation wizard.
Phase 7 — full multi-step intake form.
Phase 1: Stub with basic fields.
"""
_name = 'fl.intake.wizard'
_description = 'Family Law Case Intake Wizard'
case_type = fields.Selection([
('modification', 'Child Support Modification'),
('dissolution_children', 'Dissolution of Marriage — With Children'),
('dissolution_no_children', 'Dissolution of Marriage — No Children'),
('paternity', 'Paternity'),
('alimony_modification', 'Alimony Modification'),
('custody_modification', 'Timesharing / Custody Modification'),
], string='Case Type', required=True)
petitioner_id = fields.Many2one(
'res.partner', string='Petitioner', required=True
)
respondent_id = fields.Many2one(
'res.partner', string='Respondent'
)
domestic_violence_flag = fields.Boolean(
string='Is there a history of domestic violence?',
help='Your answer affects mediation and safety procedures'
)
has_minor_children = fields.Boolean(
string='Are there minor children involved?'
)
petitioner_fl_resident_since = fields.Date(
string='When did the petitioner become a FL resident?',
help='FL 61.021: Must be 6 months before filing'
)
def action_create_case(self):
"""Create the fl.case record from intake data."""
case = self.env['fl.case'].create({
'case_type': self.case_type,
'petitioner_id': self.petitioner_id.id,
'respondent_id': self.respondent_id.id if self.respondent_id else False,
'domestic_violence_flag': self.domestic_violence_flag,
'petitioner_fl_resident_since': self.petitioner_fl_resident_since,
})
return {
'type': 'ir.actions.act_window',
'name': 'New Case',
'res_model': 'fl.case',
'res_id': case.id,
'view_mode': 'form',
'target': 'current',
}