Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

shashank verma
On 11/11/14, 7:16 AM

Hello Roma,

Efficient way is to run python script by  using csv library. https://docs.python.org/2/library/csv.html

Lets take simple example as a reference.

NOTE: Lets assume your binary format image data stored on 3rd column in csv file

import csv

username = ''
password = ''
database = ''
sock_comm = xmlrpclib.ServerProxy('http:yourdomain/xmlrpc/common')

uid = sock_comm.login(database,username,password)

sock = xmlrpclib.ServerProxy('http:yourdomain/xmlrpc/object')

with open('my_file.csv', 'rb') as csvfile:
    spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
    for row in spamreader:
         ids = sock.execute(database,uid, password,'product.product', 'search', [('default_code','=',files_name)])
        for i in ids:

            sock.execute(database,uid, password,'product.product', 'write',i,{'image_medium':row[2]})



@shashank, thanks for your answer. I'm interested in doing a similar thing although i'd like to specify a URL, or local path instead of the binary format in CSV. I would be interested to hear any suggestions or advice you have.

Luke Branch
on 11/12/14, 1:05 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 11/10/14, 1:55 AM
Seen: 800 times
Last updated: 10/29/15, 5:43 AM