IMP connector_opencart Add bindings between Opencart Product Option Values and Odoo's Product Template Attribute Values

This commit is contained in:
Jared Kipe
2020-02-20 15:03:10 -08:00
parent 9eb593b6ae
commit ce8bb41c03
11 changed files with 226 additions and 24 deletions

View File

@@ -22,6 +22,10 @@ class Opencart:
def stores(self):
return Stores(connection=self)
@property
def products(self):
return Products(connection=self)
def get_headers(self, url, method):
headers = {}
if method in ('POST', 'PUT', ):
@@ -138,3 +142,14 @@ class Stores(Resource):
def get(self, id):
url = self.url + ('/%s' % id)
return self.connection.send_request(method='GET', url=url)
class Products(Resource):
"""
Retrieves Product details
"""
path = 'products'
def get(self, id):
url = self.url + ('/%s' % id)
return self.connection.send_request(method='GET', url=url)