diff --git a/hotel_channel_connector/wizard/__init__.py b/hotel_channel_connector/wizard/__init__.py index a3dcb1741..23fad4c27 100644 --- a/hotel_channel_connector/wizard/__init__.py +++ b/hotel_channel_connector/wizard/__init__.py @@ -1,5 +1,4 @@ # Copyright 2018 Alexandre Díaz # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import inherited_massive_changes -from . import inherited_duplicate_reservation from . import inherited_massive_price_reservation_days diff --git a/hotel_channel_connector/wizard/inherited_duplicate_reservation.py b/hotel_channel_connector/wizard/inherited_duplicate_reservation.py deleted file mode 100644 index c2dbb9415..000000000 --- a/hotel_channel_connector/wizard/inherited_duplicate_reservation.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2018 Alexandre Díaz -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.exceptions import ValidationError -from odoo import models, api, _ - - -class MassiveChangesWizard(models.TransientModel): - _inherit = 'hotel.wizard.duplicate.reservation' - - @api.multi - def duplicate_reservation(self): - reservation_id = self.env['hotel.reservation'].browse( - self.env.context.get('active_id')) - if reservation_id and reservation_id.is_from_ota: - raise ValidationError(_("Can't duplicate a reservation from channel")) - return super(MassiveChangesWizard, self).duplicate_reservation()