[FIX] pms: reservation_lines and checkin/checkout dependency

This commit is contained in:
Eric Antones
2021-11-08 11:30:04 +01:00
parent c6c038d96d
commit 8df86cd569

View File

@@ -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: