diff --git a/hotel_calendar/models/inherited_hotel_folio.py b/hotel_calendar/models/inherited_hotel_folio.py index 86364cbbf..c42a055a4 100644 --- a/hotel_calendar/models/inherited_hotel_folio.py +++ b/hotel_calendar/models/inherited_hotel_folio.py @@ -1,6 +1,6 @@ # Copyright 2018-2019 Alexandre Díaz # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, api +from odoo import models, api, _ class HotelFolio(models.Model): @@ -16,6 +16,14 @@ class HotelFolio(models.Model): record.room_lines.send_bus_notification('write', 'noshow') return ret + @api.multi + def unlink(self): + for record in self: + record.room_lines.send_bus_notification('unlink', + 'warn', + _("Reservation Deleted")) + return super(HotelFolio, self).unlink() + @api.multi def compute_amount(self): ret = super(HotelFolio, self).compute_amount()