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>
57 lines
1.9 KiB
Python
57 lines
1.9 KiB
Python
from odoo import fields, models
|
|
|
|
|
|
class FlGeneratePacketWizard(models.TransientModel):
|
|
"""
|
|
Generate full filing packet for a case.
|
|
Phase 7 — full implementation with batch PDF generation.
|
|
Phase 1: Stub.
|
|
"""
|
|
_name = 'fl.generate.packet.wizard'
|
|
_description = 'Generate Filing Packet Wizard'
|
|
|
|
case_id = fields.Many2one(
|
|
'fl.case', string='Case', required=True
|
|
)
|
|
include_financial_affidavit = fields.Boolean(
|
|
string='Financial Affidavit', default=True
|
|
)
|
|
include_support_worksheet = fields.Boolean(
|
|
string='Child Support Worksheet (FL-12.902(e))', default=True
|
|
)
|
|
include_motion_to_modify = fields.Boolean(
|
|
string='Motion to Modify Child Support', default=True
|
|
)
|
|
include_notice_ssn = fields.Boolean(
|
|
string='Notice of Social Security Number (FL-12.930(a))', default=True
|
|
)
|
|
include_mandatory_disclosure = fields.Boolean(
|
|
string='Certificate of Mandatory Disclosure (FL-12.932)', default=True
|
|
)
|
|
include_fee_waiver = fields.Boolean(
|
|
string='Fee Waiver Application (if eligible)', default=False
|
|
)
|
|
language = fields.Selection([
|
|
('en', 'English'),
|
|
('es', 'Spanish / Español'),
|
|
('both', 'Bilingual'),
|
|
], string='Document Language', default='en')
|
|
|
|
def action_generate(self):
|
|
"""
|
|
Phase 7 — generate all selected documents as PDFs.
|
|
Phase 1: Stub — posts a note and returns to case.
|
|
"""
|
|
self.case_id.message_post(
|
|
body='📄 Filing packet generation will be available in Phase 4 (Document Templates).',
|
|
subtype_xmlid='mail.mt_note',
|
|
)
|
|
return {
|
|
'type': 'ir.actions.act_window',
|
|
'name': 'Case',
|
|
'res_model': 'fl.case',
|
|
'res_id': self.case_id.id,
|
|
'view_mode': 'form',
|
|
'target': 'current',
|
|
}
|