diff --git a/hotel_channel_connector_wubook/models/hotel_room_type/deleter.py b/hotel_channel_connector_wubook/models/hotel_room_type/deleter.py index fa49153e5..31460f4bf 100644 --- a/hotel_channel_connector_wubook/models/hotel_room_type/deleter.py +++ b/hotel_channel_connector_wubook/models/hotel_room_type/deleter.py @@ -3,7 +3,8 @@ from odoo.addons.component.core import Component from odoo.addons.hotel_channel_connector.components.core import ChannelConnectorError -from odoo import api +from odoo import api, _ +from odoo.exceptions import ValidationError class HotelRoomTypeDeleter(Component): @@ -18,3 +19,4 @@ class HotelRoomTypeDeleter(Component): section='room', internal_message=str(err), channel_message=err.data['message']) + raise ValidationError(_(err.data['message']) + ". " + _(str(err))) diff --git a/hotel_channel_connector_wubook/models/hotel_room_type_restriction/deleter.py b/hotel_channel_connector_wubook/models/hotel_room_type_restriction/deleter.py index 87b19d310..5f990a772 100644 --- a/hotel_channel_connector_wubook/models/hotel_room_type_restriction/deleter.py +++ b/hotel_channel_connector_wubook/models/hotel_room_type_restriction/deleter.py @@ -3,7 +3,8 @@ from odoo.addons.component.core import Component from odoo.addons.hotel_channel_connector.components.core import ChannelConnectorError -from odoo import api +from odoo import api, _ +from odoo.exceptions import ValidationError class HotelRoomTypeRestrictionDeleter(Component): @@ -18,3 +19,4 @@ class HotelRoomTypeRestrictionDeleter(Component): section='restriction', internal_message=str(err), channel_message=err.data['message']) + raise ValidationError(_(err.data['message']) + ". " + _(str(err)))