Merge branch '11.0' of https://github.com/hootel/hootel into 11.0

This commit is contained in:
Dario Lodeiros
2019-08-20 08:59:40 +02:00

View File

@@ -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([