-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
With current "hacky" implementation one can do this, but it needs to be improved:
auth = ErplyAuth(ERPLY_CUSTOMER_CODE,
ERPLY_USERNAME,
ERPLY_PASSWORD)
erply = Erply(auth)
request = ErplyBulkRequest(erply, json.dumps)
items = [
{'price': 1, 'id': 1, 'gid': 1},
{'price': 2, 'id': 2, 'gid': 1},
{'price': 3, 'id': 3, 'gid': 1},
]
# Build requests
for item in items:
request.attach('saveProduct', **{'priceWithVAT': item['price']
'productID': item['id'],
'groupID': item['gid'],}
)
# Make the call
response = request()
# Deal with responses
for r in r.response.records:
# This part sucks with current implementation :D
print (r[0])