mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
Merge branch '11.0' of https://github.com/hootel/hootel into 11.0
This commit is contained in:
@@ -68,16 +68,6 @@ class HotelRoomTypeAvailability(models.Model):
|
|||||||
type!')
|
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')
|
@api.onchange('room_type_id')
|
||||||
def onchange_room_type_id(self):
|
def onchange_room_type_id(self):
|
||||||
channel_room_type = self.env['channel.hotel.room.type'].search([
|
channel_room_type = self.env['channel.hotel.room.type'].search([
|
||||||
|
|||||||
Reference in New Issue
Block a user