From a99475a924afb81b37b54c416d14bb773ad0cd47 Mon Sep 17 00:00:00 2001 From: DarioLodeiros Date: Sat, 16 May 2026 12:52:39 +0200 Subject: [PATCH] [FIX] pms: autocheckout - replace deprecated message_post subtype kwarg The 'subtype' kwarg of message_post() was removed in Odoo 16: it now requires either 'subtype_id' (int) or 'subtype_xmlid' (str). Replace 'subtype="mt_comment"' with 'subtype_xmlid="mail.mt_comment"' so the cron "Automatic No Checkout Reservations" stops failing with: ValueError: message_post does not support subtype parameter anymore. Please give a valid subtype_id or subtype_xmlid value instead. --- pms/models/pms_reservation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pms/models/pms_reservation.py b/pms/models/pms_reservation.py index d33a7d4103..518f619e47 100644 --- a/pms/models/pms_reservation.py +++ b/pms/models/pms_reservation.py @@ -2321,7 +2321,9 @@ def autocheckout(self, reservation): ): msg = _("No checkin was made for this reservation") reservation.message_post( - subject=_("No Checkins!"), subtype="mt_comment", body=msg + subject=_("No Checkins!"), + subtype_xmlid="mail.mt_comment", + body=msg, ) return True