From e3ecc376406f0ee7b5fa82d6898d45753172e03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=ADaz?= Date: Wed, 30 Jan 2019 22:32:18 +0100 Subject: [PATCH] [FIX] Longpolling messages --- hotel_calendar/models/inherited_hotel_reservation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 579e5ae96..15e0edcbb 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -434,7 +434,9 @@ class HotelReservation(models.Model): def send_bus_notification(self, naction, ntype, ntitle=''): hotel_cal_obj = self.env['bus.hotel.calendar'] for record in self: - if not isinstance(record.id, models.NewId): + if not isinstance(record.id, models.NewId) \ + and not isinstance(record.folio_id.id, models.NewId) \ + and not isinstance(record.partner_id.id, models.NewId): hotel_cal_obj.send_reservation_notification( record.generate_bus_values(naction, ntype, ntitle))