I'm relatively new to odoo and i would like to upload an image using the XML RPC web service
image = open('max.png', 'rb')
imageBase64 = base64.b64encode(image)
# Updating record
id = models.execute_kw(db, uid, password, 'hr.employee', 'write', [
[uid], {'image': imageBase64, 'job_title': "test"}])The above code gives me the following error:
TypeError: a bytes-like object is required, not '_io.BufferedReader'
Check odoo customization tips: https://learnopenerp.tumblr.com/
Hope this will helps
@Sehrish.. Thank you for your quick response.
Unfortunately the link doesn't contain any information about XML RPC which is what i'm trying to use to upload the images
Check this one: http://learnopenerp.blogspot.com/2019/10/connecting-to-odoo-using-xml-rpc.html