From 8df86cd569eaa3d5c3bfc041f73e639a318ac37c Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Mon, 8 Nov 2021 11:30:04 +0100 Subject: [PATCH] [FIX] pms: reservation_lines and checkin/checkout dependency --- pms/models/pms_service.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pms/models/pms_service.py b/pms/models/pms_service.py index bd0c8492a..d52c73f92 100644 --- a/pms/models/pms_service.py +++ b/pms/models/pms_service.py @@ -299,6 +299,12 @@ class PmsService(models.Model): day_qty = 1 if service.reservation_id and service.product_id: reservation = service.reservation_id + # REVIEW: review method dependencies, reservation_line_ids + # instead of checkin/checkout + if not reservation.checkin or not reservation.checkout: + if not service.service_line_ids: + service.service_line_ids = False + continue product = service.product_id consumed_on = product.consumed_on if product.per_day: