mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] moved settings to company / hotel / user models
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user