diff --git a/hotel/models/hotel_property.py b/hotel/models/hotel_property.py index e62fefff1..b65971e69 100644 --- a/hotel/models/hotel_property.py +++ b/hotel/models/hotel_property.py @@ -13,34 +13,44 @@ class HotelProperty(models.Model): _inherits = {'res.partner': 'partner_id'} # Fields declaration - partner_id = fields.Many2one('res.partner', 'Hotel Property', - required=True, delegate=True, ondelete='cascade') - company_id = fields.Many2one('res.company', help='The company that owns or operates this hotel.', - required=True) - user_ids = fields.Many2many('res.users', 'hotel_property_users_rel', 'hotel_id', 'user_id', - string='Accepted Users') - - room_type_ids = fields.One2many('hotel.room.type', 'hotel_id', 'Room Types') - room_ids = fields.One2many('hotel.room', 'hotel_id', 'Rooms') - - # TODO: refactoring res.config.settings', 'default_pricelist_id' by the current hotel.property.pricelist_id - default_pricelist_id = fields.Many2one('product.pricelist', 'Product Pricelist', - help='The default pricelist used in this hotel.', - required=True) - # TODO: refactoring res.config.settings', 'default_restriction_id by the current hotel.property.restriction_id - default_restriction_id = fields.Many2one('hotel.room.type.restriction', 'Restriction Plan', - help='The default restriction plan used in this hotel.', - required=True) - - # TODO: refactoring 'res.config.settings', 'default_arrival_hour' by the current hotel.property.arrival_hour + partner_id = fields.Many2one( + 'res.partner', + 'Hotel Property', + required=True, + delegate=True, + ondelete='cascade') + company_id = fields.Many2one( + 'res.company', + required=True, + help='The company that owns or operates this hotel.') + user_ids = fields.Many2many( + 'res.users', + 'hotel_property_users_rel', + 'hotel_id', + 'user_id', + string='Accepted Users') + room_type_ids = fields.One2many( + 'hotel.room.type', + 'hotel_id', + 'Room Types') + room_ids = fields.One2many( + 'hotel.room', + 'hotel_id', + 'Rooms') + default_pricelist_id = fields.Many2one( + 'product.pricelist', + string='Product Pricelist', + required=True, + help='The default pricelist used in this hotel.') + default_restriction_id = fields.Many2one( + 'hotel.room.type.restriction', + 'Restriction Plan', + required=True, + help='The default restriction plan used in this hotel.') default_arrival_hour = fields.Char('Arrival Hour (GMT)', help="HH:mm Format", default="14:00") - # TODO: refactoring 'res.config.settings', 'default_departure_hour' by the current hotel.property.departure_hour default_departure_hour = fields.Char('Departure Hour (GMT)', help="HH:mm Format", default="12:00") - - # TODO: refactoring 'res.config.settings', 'tz_hotel' by the current hotel.property.tz (inherited in res.partner) - default_cancel_policy_days = fields.Integer('Cancellation Days') default_cancel_policy_percent = fields.Float('Percent to pay')