[UPD] Task 973 - raise error on delete

This commit is contained in:
Pablo
2019-07-26 13:57:21 +02:00
parent d71c29f2f4
commit 71f7fbded3
2 changed files with 6 additions and 2 deletions

View File

@@ -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)))

View File

@@ -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)))