from odoo import models, fields, _


class DeathReasonSettings(models.Model):
    _name = 'death.reason.settings'

    name = fields.Char(required=True)
    not_defined = fields.Boolean(default=False)
    active = fields.Boolean(default=True)

    _sql_constraints = [
        (
            'uniq_name',
            'UNIQUE( name )',
            _('This death reason already exists!')
        )
    ]
    