You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
524 B
13 lines
524 B
# -*- 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')
|
|
default_can_overlap = fields.Boolean(string="Table bookings can overlap", default_model='restaurant.booking', default=False)
|
|
|
|
_sql_constraints = [
|
|
('duration_positive', 'CHECK(default_duration >= 0)', "The default booking duration must be positive or null.")
|
|
]
|