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):
|
||||
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):
|
||||
url = self.url + '/%s/cancel' % id
|
||||
return self.send_request(
|
||||
method='POST', url=url, data=self.get_cancel_payload(lines))
|
||||
return self.connection.send_request(
|
||||
method='POST', url=url, body=self.get_cancel_payload(lines))
|
||||
|
||||
def get_cancel_payload(self, lines):
|
||||
element = ElementMaker(
|
||||
|
||||
@@ -172,7 +172,8 @@ class SaleOrderAdapter(Component):
|
||||
if not 'list' in orders_response:
|
||||
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:
|
||||
self.env[self._apply_on].with_delay().import_batch(
|
||||
self.backend_record,
|
||||
|
||||
Reference in New Issue
Block a user