from odoo import fields, models class FlStatute(models.Model): _name = 'fl.statute' _description = 'Florida Statute Reference' _order = 'name' name = fields.Char( string='Statute', required=True, help='e.g. FL 61.30' ) title = fields.Char(string='Title', required=True) description = fields.Text(string='Summary') category = fields.Selection([ ('child_support', 'Child Support'), ('modification', 'Modification'), ('alimony', 'Alimony'), ('timesharing', 'Timesharing / Parental Responsibility'), ('dissolution', 'Dissolution of Marriage'), ('paternity', 'Paternity'), ('domestic_violence', 'Domestic Violence'), ('enforcement', 'Enforcement'), ('disclosure', 'Mandatory Disclosure'), ('fee_waiver', 'Fee Waiver / Indigent Status'), ('procedure', 'Procedure'), ('discovery', 'Discovery'), ('other', 'Other'), ], string='Category') url = fields.Char(string='Official URL') active = fields.Boolean(default=True) _sql_constraints = [ ('name_uniq', 'unique(name)', 'Statute reference must be unique.'), ] class FlIssueTag(models.Model): _name = 'fl.issue.tag' _description = 'Legal Issue Tag' _order = 'name' name = fields.Char(string='Tag', required=True) name_es = fields.Char(string='Tag (Spanish)') color = fields.Integer(string='Color Index', default=0) case_type = fields.Selection([ ('modification', 'Modification'), ('dissolution', 'Dissolution'), ('paternity', 'Paternity'), ('all', 'All Cases'), ], string='Applies To', default='all') _sql_constraints = [ ('name_uniq', 'unique(name)', 'Issue tag name must be unique.'), ]