[WIP] moved settings to company / hotel / user models

This commit is contained in:
Pablo
2019-08-29 18:11:28 +02:00
committed by Dario Lodeiros
parent 62d59fcaa4
commit 98374c8d39
17 changed files with 197 additions and 164 deletions

View File

@@ -40,6 +40,9 @@ class HotelProperty(models.Model):
# 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')
def _check_hours(self):
r = re.compile('[0-2][0-9]:[0-5][0-9]')
if not r.match(self.arrival_hour):

View File

@@ -18,7 +18,7 @@ class HotelRoomTypeRestriction(models.Model):
help='If unchecked, it will allow you to hide the '
'restriction plan without removing it.')
hotel_ids = fields.One2many('hotel.property',
'restriction_id', string='Restriction Plan',
'restriction_id', string='Hotel',
default=_get_default_hotel, required=True)
@api.multi

View File

@@ -9,18 +9,18 @@ class ResCompany(models.Model):
hotel_ids = fields.One2many('hotel.property', 'company_id', 'Hotels')
additional_hours = fields.Integer('Additional Hours',
help="Provide the min hours value for \
check in, checkout days, whatever \
the hours will be provided here based \
on that extra days will be \
calculated.")
default_cancel_policy_days = fields.Integer('Cancelation Days')
default_cancel_policy_percent = fields.Integer('Percent to pay')
cardex_warning = fields.Text(
'Warning in Cardex',
default="Time to access rooms: 14: 00h. Departure time: \
12: 00h. If the accommodation is not left at that time, \
the establishment will charge a day's stay according to \
current rate that day",
help="Notice under the signature on the traveler's ticket.")
# TODO: need extra explanation or remove otherwise
# additional_hours = fields.Integer('Additional Hours',
# help="Provide the min hours value for \
# check in, checkout days, whatever \
# the hours will be provided here based \
# on that extra days will be \
# calculated.")
# TODO: move the text to the default template for confirmed reservations
# cardex_warning = fields.Text(
# 'Warning in Cardex',
# default="Time to access rooms: 14: 00h. Departure time: \
# 12: 00h. If the accommodation is not left at that time, \
# the establishment will charge a day's stay according to \
# current rate that day",
# help="Notice under the signature on the traveler's ticket.")