|
|
@ -55,9 +55,9 @@ class RestaurantBooking(models.Model): |
|
|
|
string="Tables bookings", readonly=True) |
|
|
|
|
|
|
|
_sql_constraints = [ |
|
|
|
('start_time_check', 'CHECK(time_start >= 0 AND time_start <= 24)', "The start time must be between 0 and 24.") |
|
|
|
('stop_time_check', 'CHECK(time_stop >= 0 AND time_stop <= 24)', "The stop time must be between 0 and 24.") |
|
|
|
('times_order_check', 'CHECK(time_start < time_stop)', "The start time must be lower than the stop time.") |
|
|
|
('start_time_check', 'CHECK(time_start >= 0 AND time_start <= 24)', "The start time must be between 0 and 24."), |
|
|
|
('stop_time_check', 'CHECK(time_stop >= 0 AND time_stop <= 24)', "The stop time must be between 0 and 24."), |
|
|
|
('times_order_check', 'CHECK(time_start < time_stop)', "The start time must be lower than the stop time."), |
|
|
|
] |
|
|
|
|
|
|
|
@api.depends('time_start', 'duration') |
|
|
|