From 3fe004ad22a2e79cdc4f59f07776205595d88cbd Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 30 Apr 2019 12:32:25 +0200 Subject: [PATCH] [DEL] redeclared sql_constraint --- hotel/models/hotel_room_type.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hotel/models/hotel_room_type.py b/hotel/models/hotel_room_type.py index aade9f8bf..0d21fd957 100644 --- a/hotel/models/hotel_room_type.py +++ b/hotel/models/hotel_room_type.py @@ -41,13 +41,11 @@ class HotelRoomType(models.Model): _order = "sequence, code_type, name" - _sql_constraints = [('code_type_unique', 'unique(code_type)', - 'code must be unique!')] # total number of rooms in this type total_rooms_count = fields.Integer(compute='_compute_total_rooms', store=True) - _sql_constraints = [ - ('code_unique', 'unique(code_type)', 'Room Type Code must be unique!')] + _sql_constraints = [('code_unique', 'unique(code_type)', + 'Room Type Code must be unique!')] @api.depends('room_ids') def _compute_total_rooms(self):