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:
@@ -34,7 +34,6 @@
|
||||
'wizard/massive_price_reservation_days.xml',
|
||||
'wizard/folio_make_invoice_advance_views.xml',
|
||||
'data/hotel_sequence.xml',
|
||||
'views/inherited_res_company_views.xml',
|
||||
'views/inherited_res_users_views.xml',
|
||||
'views/hotel_property_views.xml',
|
||||
'views/hotel_floor_views.xml',
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -20,19 +20,23 @@
|
||||
</group>
|
||||
</page>
|
||||
<page string="Settings" name="hotel_settings">
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="4" string="Price and Restriction Plans">
|
||||
<field name="pricelist_id" required="True" />
|
||||
<field name="restriction_id" required="True" />
|
||||
</group>
|
||||
<group>
|
||||
<group string="Timezone">
|
||||
<field name="tz" widget="timezone_mismatch"/>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="4" string="Check-in hours">
|
||||
<field name="arrival_hour" />
|
||||
<field name="departure_hour" />
|
||||
</group>
|
||||
<group colspan="4" col="4" string="Cancellation policies">
|
||||
<field name="default_cancel_policy_days" />
|
||||
<field name="default_cancel_policy_percent" />
|
||||
</group>
|
||||
</page>
|
||||
<page string="Rooms" name="hotel_settings">
|
||||
<page string="Rooms" name="hotel_rooms">
|
||||
<group>
|
||||
<field name="room_type_ids"/>
|
||||
<field name="room_ids"/>
|
||||
|
||||
Reference in New Issue
Block a user