[FIX] pms-l10n_es: fix sending incomplete PV's checkin hours after 1st checkin

This commit is contained in:
miguelpadin
2024-10-03 16:45:56 +02:00
parent bc465018ba
commit f9ac160f7f

View File

@@ -1141,9 +1141,9 @@ class TravellerReport(models.TransientModel):
] ]
): ):
try: try:
if ( time_difference = fields.Datetime.now() - communication.create_date
fields.Datetime.now() - communication.create_date hours_difference = time_difference.days * 24 + time_difference.seconds // 3600
).hours > hours_after_first_checkin_to_inform: if hours_difference > hours_after_first_checkin_to_inform:
# add a note to the reservation # add a note to the reservation
communication.reservation_id.sudo().message_post( communication.reservation_id.sudo().message_post(
body=_( body=_(