[ADD] sql constrain for channel board service and room type

This commit is contained in:
Pablo
2019-02-13 16:28:22 +01:00
committed by Dario Lodeiros
parent ba89818d1d
commit 2c36a6dda2

View File

@@ -9,3 +9,8 @@ class HotelBoardServiceRoomType(models.Model):
_inherit = 'hotel.board.service.room.type'
channel_service = fields.Selection([], string='Channel Board Service')
_sql_constraints = [
('room_type_channel_service_id_uniq', 'unique(hotel_room_type_id, channel_service)',
'The channel board service must be unique for room type.'),
]