From f9dee6393f02d4a81db1ee0bc70ba791893f7359 Mon Sep 17 00:00:00 2001 From: Pablo Date: Fri, 16 Aug 2019 11:22:08 +0200 Subject: [PATCH] [FIX] deprecated max availability constraint --- .../models/hotel_room_type_availability/common.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hotel_channel_connector/models/hotel_room_type_availability/common.py b/hotel_channel_connector/models/hotel_room_type_availability/common.py index 888862bec..267db630e 100644 --- a/hotel_channel_connector/models/hotel_room_type_availability/common.py +++ b/hotel_channel_connector/models/hotel_room_type_availability/common.py @@ -68,16 +68,6 @@ class HotelRoomTypeAvailability(models.Model): type!') ] - @api.constrains('max_avail', 'quota') - def _check_max_avail_quota(self): - for record in self: - if record.quota > record.room_type_id.total_rooms_count: - raise ValidationError(_("The quota assigned to the channel manager can't be greater " - "than the total rooms count!")) - if record.max_avail > record.room_type_id.total_rooms_count: - raise ValidationError(_("The maximum simultaneous availability can't be greater " - "than the total rooms count!")) - @api.onchange('room_type_id') def onchange_room_type_id(self): channel_room_type = self.env['channel.hotel.room.type'].search([