Files
pms/hotel_calendar/models/inherited_hotel_property.py

51 lines
1.7 KiB
Python

# Copyright 2019 Pablo Quesada
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
class HotelProperty(models.Model):
_inherit = 'hotel.property'
pms_show_num_rooms = fields.Integer('Number of rooms to show',
default=0)
pms_divide_rooms_by_capacity = fields.Boolean('Divide rooms by capacity',
default=True)
pms_end_day_week = fields.Selection([
('1', 'Monday'),
('2', 'Tuesday'),
('3', 'Wednesday'),
('4', 'Thursday'),
('5', 'Friday'),
('6', 'Saturday'),
('7', 'Sunday')
], string='Highlight column of day', default='6')
pms_end_day_week_offset = fields.Selection([
('0', '0 Days'),
('1', '1 Days'),
('2', '2 Days'),
('3', '3 Days'),
('4', '4 Days'),
('5', '5 Days'),
('6', '6 Days')
], string='Also illuminate the previous', default='0')
pms_default_num_days = fields.Selection([
('month', '1 Month'),
('21', '3 Weeks'),
('14', '2 Weeks'),
('7', '1 Week')
], string='Default number of days', default='month')
# TODO: review the use of the following option in the calendar js functions
pms_type_move = fields.Selection([
('normal', 'Normal'),
('assisted', 'Assisted'),
('allow_invalid', 'Allow Invalid')
], string='Reservation move mode', default='normal')
pms_allowed_events_tags = fields.Many2many(
'calendar.event.type',
string="Allow Calendar Event Tags")
pms_denied_events_tags = fields.Many2many(
'calendar.event.type',
string="Deny Calendar Event Tags")