mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
FIX connector_walmart Order Acknowledge in API
This commit is contained in:
@@ -389,12 +389,12 @@ class Orders(Resource):
|
|||||||
|
|
||||||
def acknowledge(self, id):
|
def acknowledge(self, id):
|
||||||
url = self.url + '/%s/acknowledge' % id
|
url = self.url + '/%s/acknowledge' % id
|
||||||
return self.send_request(method='POST', url=url)
|
return self.connection.send_request(method='POST', url=url)
|
||||||
|
|
||||||
def cancel(self, id, lines):
|
def cancel(self, id, lines):
|
||||||
url = self.url + '/%s/cancel' % id
|
url = self.url + '/%s/cancel' % id
|
||||||
return self.send_request(
|
return self.connection.send_request(
|
||||||
method='POST', url=url, data=self.get_cancel_payload(lines))
|
method='POST', url=url, body=self.get_cancel_payload(lines))
|
||||||
|
|
||||||
def get_cancel_payload(self, lines):
|
def get_cancel_payload(self, lines):
|
||||||
element = ElementMaker(
|
element = ElementMaker(
|
||||||
|
|||||||
@@ -172,7 +172,8 @@ class SaleOrderAdapter(Component):
|
|||||||
if not 'list' in orders_response:
|
if not 'list' in orders_response:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
next = orders_response['list']['meta']['nextCursor']
|
# 'meta' may not be there (though it is in the example on the API docs even when nextCursor is none)
|
||||||
|
next = orders_response.get('list', {}).get('meta', {}).get('nextCursor')
|
||||||
if next:
|
if next:
|
||||||
self.env[self._apply_on].with_delay().import_batch(
|
self.env[self._apply_on].with_delay().import_batch(
|
||||||
self.backend_record,
|
self.backend_record,
|
||||||
|
|||||||
Reference in New Issue
Block a user