from odoo import api, fields, models class FlDeposition(models.Model): """ Phase 3 — Full implementation with notice validation, duces tecum, no-show workflow. Phase 1: Stub with core fields. """ _name = 'fl.deposition' _description = 'Deposition Record' _inherit = ['mail.thread'] _order = 'scheduled_date asc' case_id = fields.Many2one( 'fl.case', required=True, ondelete='cascade', index=True ) deponent_id = fields.Many2one( 'res.partner', string='Deponent', required=True ) deponent_type = fields.Selection([ ('opposing_party', 'Opposing Party'), ('employer', 'Employer'), ('accountant_cpa', 'Accountant / CPA'), ('business_partner', 'Business Partner'), ('vocational_expert', 'Vocational Expert'), ('witness', 'Witness'), ('other', 'Other'), ], string='Deponent Type', required=True) notice_date = fields.Date( string='Notice Served Date', help='FL 1.310(b): Minimum 10 days notice required before deposition' ) scheduled_date = fields.Datetime(string='Deposition Date / Time') location = fields.Char(string='Location / Zoom Link') state = fields.Selection([ ('draft', 'Drafting Notice'), ('noticed', 'Notice Served'), ('confirmed', 'Confirmed'), ('completed', 'Completed'), ('no_show', 'Deponent No-Show'), ('cancelled', 'Cancelled'), ('rescheduled', 'Rescheduled'), ], string='Status', default='draft', tracking=True) duces_tecum = fields.Boolean( string='Duces Tecum (Document Production)', help='Deponent is required to bring documents' ) max_duration_hours = fields.Float( default=7.0, help='FL 1.310(d): Maximum 7 hours per deponent per day' ) income_verified = fields.Boolean(string='Income Figures Verified') income_verified_amount = fields.Float(string='Verified Income Amount ($)') key_findings = fields.Text(string='Key Findings') notes = fields.Text(string='Notes')