diff --git a/connector_walmart/__manifest__.py b/connector_walmart/__manifest__.py index e20bd78e..33bca3fb 100644 --- a/connector_walmart/__manifest__.py +++ b/connector_walmart/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Walmart Connector', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Connector', 'depends': [ 'account', diff --git a/connector_walmart/models/sale_order/common.py b/connector_walmart/models/sale_order/common.py index b173ad04..2a9f8c17 100644 --- a/connector_walmart/models/sale_order/common.py +++ b/connector_walmart/models/sale_order/common.py @@ -6,6 +6,7 @@ import logging import odoo.addons.decimal_precision as dp from odoo import models, fields, api +from odoo.exceptions import ValidationError from odoo.addons.queue_job.job import job from odoo.addons.component.core import Component from odoo.addons.queue_job.exception import RetryableJobError @@ -167,6 +168,8 @@ class SaleOrderAdapter(Component): api_instance = self.api_instance orders_response = api_instance.orders.all(**arguments) + if 'error' in orders_response: + raise ValidationError(str(orders_response)) _logger.debug(orders_response) if not 'list' in orders_response: diff --git a/connector_walmart/views/walmart_backend_views.xml b/connector_walmart/views/walmart_backend_views.xml index 4aa02aa8..af4c84e6 100644 --- a/connector_walmart/views/walmart_backend_views.xml +++ b/connector_walmart/views/walmart_backend_views.xml @@ -14,7 +14,7 @@ - + @@ -38,7 +38,7 @@ - + By clicking on the buttons, @@ -58,9 +58,9 @@ of the new records to review in the menu 'Connectors > Checkpoint'. - + - +
By clicking on the buttons, @@ -58,9 +58,9 @@ of the new records to review in the menu 'Connectors > Checkpoint'.