# -*- coding: utf-8 -*- from odoo import models, fields class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' default_duration = fields.Float(string="Default duration", default_model='restaurant.booking') _sql_constraints = [ ('duration_positive', 'CHECK(default_duration >= 0)', "The default booking duration must be positive or null.") ]