From 8b736cd659204050cfb9f4f3645ebfc5b64a5496 Mon Sep 17 00:00:00 2001 From: miguelpadin Date: Tue, 20 Dec 2022 18:42:21 +0100 Subject: [PATCH] [IMP] pms: add out of service to folio, related from reservation --- pms/models/pms_folio.py | 4 ++++ pms/models/pms_reservation.py | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pms/models/pms_folio.py b/pms/models/pms_folio.py index 67216f78e..50467ca52 100644 --- a/pms/models/pms_folio.py +++ b/pms/models/pms_folio.py @@ -329,6 +329,10 @@ class PmsFolio(models.Model): comodel_name="room.closure.reason", check_pms_properties=True, ) + out_service_description = fields.Text( + string="Cause of out of service", + help="Indicates the cause of out of service", + ) segmentation_ids = fields.Many2many( string="Segmentation", help="Segmentation tags to classify folios", diff --git a/pms/models/pms_reservation.py b/pms/models/pms_reservation.py index 3dbbe2ca5..0408fc1e2 100644 --- a/pms/models/pms_reservation.py +++ b/pms/models/pms_reservation.py @@ -159,6 +159,12 @@ class PmsReservation(models.Model): check_pms_properties=True, readonly=False, ) + out_service_description = fields.Text( + string="Cause of out of service", + help="Indicates the cause of out of service", + related="folio_id.out_service_description", + readonly=False, + ) company_id = fields.Many2one( string="Company", help="Company to which the reservation belongs", @@ -411,10 +417,7 @@ class PmsReservation(models.Model): selection=[("late", "Late"), ("intime", "In time"), ("noshow", "No Show")], tracking=True, ) - out_service_description = fields.Text( - string="Cause of out of service", - help="Indicates the cause of out of service", - ) + checkin = fields.Date( string="Check In", help="It is the checkin date of the reservation, ",